mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
tweak options for delete and write, #48034
This commit is contained in:
@@ -119,11 +119,11 @@ class ConsumerFileSystem implements vscode.FileSystem {
|
||||
async readFile(uri: vscode.Uri): Promise<Uint8Array> {
|
||||
return this._proxy.$readFile(uri).then(buff => buff.buffer).catch(ConsumerFileSystem._handleError);
|
||||
}
|
||||
writeFile(uri: vscode.Uri, content: Uint8Array, options: { create: boolean; overwrite: boolean; } = { create: true, overwrite: true }): Promise<void> {
|
||||
return this._proxy.$writeFile(uri, VSBuffer.wrap(content), options).catch(ConsumerFileSystem._handleError);
|
||||
writeFile(uri: vscode.Uri, content: Uint8Array): Promise<void> {
|
||||
return this._proxy.$writeFile(uri, VSBuffer.wrap(content)).catch(ConsumerFileSystem._handleError);
|
||||
}
|
||||
delete(uri: vscode.Uri, options: { recursive: boolean; } = { recursive: false }): Promise<void> {
|
||||
return this._proxy.$delete(uri, { ...options, useTrash: false }).catch(ConsumerFileSystem._handleError); //todo@joh useTrash
|
||||
delete(uri: vscode.Uri, options: { recursive: boolean; useTrash: boolean; } = { recursive: false, useTrash: false }): Promise<void> {
|
||||
return this._proxy.$delete(uri, options).catch(ConsumerFileSystem._handleError);
|
||||
}
|
||||
rename(oldUri: vscode.Uri, newUri: vscode.Uri, options: { overwrite: boolean; } = { overwrite: false }): Promise<void> {
|
||||
return this._proxy.$rename(oldUri, newUri, options).catch(ConsumerFileSystem._handleError);
|
||||
|
||||
Reference in New Issue
Block a user