136
137
protected async withProvider(resource: URI): Promise<IFileSystemProvider> {
139
>
// Assert path is absolute
140
>
if (!isAbsolutePath(resource)) {
141
throw new FileOperationError(localize('invalidPath', "Unable to resolve filesystem provider with relative file path '{0}'", this.resourceForError(resource)), FileOperationResult.FILE_INVALID_PATH);
142
}
144
>
// Activate provider
145
>
await this.activateProvider(resource.scheme);
146
>
147
>
// Assert provider
148
>
const provider = this.provider.get(resource.scheme);
149
>
if (!provider) {
150
const error = new ErrorNoTelemetry();
151
error.message = localize('noProviderFound', "ENOPRO: No file system provider found for resource '{0}'", resource.toString());