Theia API Documentation v1.65.0
    Preparing search index...

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

    }

    Implements

    Index

    Constructors

    Methods