Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FileServiceContribution

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

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);
})());
}
});

}

Hierarchy

  • FileServiceContribution

Index

Methods

  • registerFileSystemProviders(service: FileService): void