@@ -10,7 +10,7 @@ import { generateUuid } from 'vs/base/common/uuid';
1010import { IChannel } from 'vs/base/parts/ipc/common/ipc' ;
1111import { FileChangeType , FileDeleteOptions , FileOverwriteOptions , FileSystemProviderCapabilities , FileType , IFileChange , IStat , IWatchOptions , FileOpenOptions , IFileSystemProviderWithFileReadWriteCapability , FileWriteOptions , IFileSystemProviderWithFileReadStreamCapability , IFileSystemProviderWithFileFolderCopyCapability , FileReadStreamOptions , IFileSystemProviderWithOpenReadWriteCloseCapability } from 'vs/platform/files/common/files' ;
1212import { VSBuffer } from 'vs/base/common/buffer' ;
13- import { IRemoteAgentEnvironment } from 'vs/platform/ remote/common/remoteAgentEnvironment ' ;
13+ import { IRemoteAgentService } from 'vs/workbench/services/ remote/common/remoteAgentService ' ;
1414import { OperatingSystem } from 'vs/base/common/platform' ;
1515import { newWriteableStream , ReadableStreamEvents , ReadableStreamEventPayload } from 'vs/base/common/stream' ;
1616import { CancellationToken } from 'vs/base/common/cancellation' ;
@@ -31,6 +31,7 @@ export class RemoteFileSystemProvider extends Disposable implements
3131 IFileSystemProviderWithFileFolderCopyCapability {
3232
3333 private readonly session : string = generateUuid ( ) ;
34+ private readonly channel : IChannel ;
3435
3536 private readonly _onDidChange = this . _register ( new Emitter < readonly IFileChange [ ] > ( ) ) ;
3637 readonly onDidChangeFile = this . _onDidChange . event ;
@@ -44,11 +45,14 @@ export class RemoteFileSystemProvider extends Disposable implements
4445 private _capabilities ! : FileSystemProviderCapabilities ;
4546 get capabilities ( ) : FileSystemProviderCapabilities { return this . _capabilities ; }
4647
47- constructor ( private readonly channel : IChannel , environment : Promise < IRemoteAgentEnvironment | null > ) {
48+ constructor ( remoteAgentService : IRemoteAgentService ) {
4849 super ( ) ;
4950
51+ const connection = remoteAgentService . getConnection ( ) ! ;
52+ this . channel = connection . getChannel < IChannel > ( REMOTE_FILE_SYSTEM_CHANNEL_NAME ) ;
53+
5054 this . setCaseSensitive ( true ) ;
51- environment . then ( remoteAgentEnvironment => this . setCaseSensitive ( ! ! ( remoteAgentEnvironment && remoteAgentEnvironment . os === OperatingSystem . Linux ) ) ) ;
55+ remoteAgentService . getEnvironment ( ) . then ( remoteAgentEnvironment => this . setCaseSensitive ( ! ! ( remoteAgentEnvironment && remoteAgentEnvironment . os === OperatingSystem . Linux ) ) ) ;
5256
5357 this . registerListeners ( ) ;
5458 }
0 commit comments