@@ -21,27 +21,20 @@ export class RemoteExtensionsFileSystemProvider extends Disposable implements IF
2121
2222 private readonly _session : string ;
2323 private readonly _channel : IChannel ;
24- private readonly _onDidChange = this . _register ( new Emitter < IFileChange [ ] > ( ) ) ;
2524
25+ private readonly _onDidChange = this . _register ( new Emitter < IFileChange [ ] > ( ) ) ;
2626 readonly onDidChangeFile : Event < IFileChange [ ] > = this . _onDidChange . event ;
27- readonly capabilities : FileSystemProviderCapabilities ;
2827
29- constructor (
30- channel : IChannel ,
31- isCaseSensitive : boolean
32- ) {
28+ public capabilities : FileSystemProviderCapabilities ;
29+ private readonly _onDidChangeCapabilities = this . _register ( new Emitter < void > ( ) ) ;
30+ readonly onDidChangeCapabilities : Event < void > = this . _onDidChangeCapabilities . event ;
31+
32+ constructor ( channel : IChannel ) {
3333 super ( ) ;
3434 this . _session = generateUuid ( ) ;
3535 this . _channel = channel ;
3636
37- let capabilities = (
38- FileSystemProviderCapabilities . FileReadWrite
39- | FileSystemProviderCapabilities . FileFolderCopy
40- ) ;
41- if ( isCaseSensitive ) {
42- capabilities |= FileSystemProviderCapabilities . PathCaseSensitive ;
43- }
44- this . capabilities = capabilities ;
37+ this . setCaseSensitive ( true ) ;
4538
4639 this . _channel . listen < IFileChangeDto [ ] > ( 'filechange' , [ this . _session ] ) ( ( events ) => {
4740 this . _onDidChange . fire ( events . map ( RemoteExtensionsFileSystemProvider . _createFileChange ) ) ;
@@ -52,6 +45,18 @@ export class RemoteExtensionsFileSystemProvider extends Disposable implements IF
5245 super . dispose ( ) ;
5346 }
5447
48+ setCaseSensitive ( isCaseSensitive : boolean ) {
49+ let capabilities = (
50+ FileSystemProviderCapabilities . FileReadWrite
51+ | FileSystemProviderCapabilities . FileFolderCopy
52+ ) ;
53+ if ( isCaseSensitive ) {
54+ capabilities |= FileSystemProviderCapabilities . PathCaseSensitive ;
55+ }
56+ this . capabilities = capabilities ;
57+ this . _onDidChangeCapabilities . fire ( void 0 ) ;
58+ }
59+
5560 watch ( resource : URI , opts : IWatchOptions ) : IDisposable {
5661 const req = Math . random ( ) ;
5762 this . _channel . call ( 'watch' , [ this . _session , req , resource , opts ] ) ;
0 commit comments