A FileServiceContribution can be used to add custom FileSystemProviders. For this, the contribution has to listen to the FileSystemProviderActivationEvent and register the custom FileSystemProviders according to the scheme when this event is fired.
export class MyFileServiceContribution implements FileServiceContribution { registerFileSystemProviders(service: FileService): void { service.onWillActivateFileSystemProvider(event => { if (event.scheme === 'mySyncProviderScheme') { service.registerProvider('mySyncProviderScheme', this.mySyncProvider); } if (event.scheme === 'myAsyncProviderScheme') { event.waitUntil((async () => { const myAsyncProvider = await this.createAsyncProvider(); service.registerProvider('myAsyncProviderScheme', myAsyncProvider); })()); } }); }
Register custom file system providers for the given FileService.
The file service for which the providers should be registered.
A FileServiceContribution can be used to add custom FileSystemProviders. For this, the contribution has to listen to the FileSystemProviderActivationEvent and register the custom FileSystemProviders according to the scheme when this event is fired.
Example usage