485
486
async delete(resource: URI, opts: IFileDeleteOptions): Promise<void> {
488
>
try {
489
>
const originalUri = this._decodeUri(resource);
490
>
await connection.resourceDelete({ channel: ROOT_STATE_URI, uri: originalUri.toString(), recursive: opts.recursive });
491
>
} catch (err) {
492
>
throw this._mapError(err, FileSystemProviderErrorCode.NoPermissions);
493
>
}
494
>
}
495
496
async rename(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void> {
498
>
try {
499
>
const originalFrom = this._decodeUri(from);
500
>
const originalTo = this._decodeUri(to);
501
>
await connection.resourceMove({ channel: ROOT_STATE_URI, source: originalFrom.toString(), destination: originalTo.toString(), failIfExists: !opts.overwrite });
502
>
} catch (err) {
503
>
throw this._mapError(err, FileSystemProviderErrorCode.NoPermissions);
504
>
}
505
>
}
506
507
async copy(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void> {