diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index cd72d7d27bfe1..b4a2aabc165f7 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -232,17 +232,17 @@ declare module 'vscode' { readonly onDidChange?: Event; - stat(resource: Uri, token: CancellationToken): Thenable; + stat(uri: Uri, token: CancellationToken): Thenable; - readdir(resource: Uri, token: CancellationToken): Thenable<[Uri, FileStat][]>; + readdir(uri: Uri, token: CancellationToken): Thenable<[Uri, FileStat][]>; - readFile(resource: Uri, token: CancellationToken): Thenable; + readFile(uri: Uri, token: CancellationToken): Thenable; - writeFile(resource: Uri, content: Uint8Array, token: CancellationToken): Thenable; + writeFile(uri: Uri, content: Uint8Array, token: CancellationToken): Thenable; // todo@remote // Thenable - move(resource: Uri, target: Uri): Thenable; + rename(oldUri: Uri, newUri: Uri): Thenable; // todo@remote // helps with performance bigly diff --git a/src/vs/workbench/api/node/extHostFileSystem.ts b/src/vs/workbench/api/node/extHostFileSystem.ts index 2b3d8c6fdeeae..aa5115926ea6f 100644 --- a/src/vs/workbench/api/node/extHostFileSystem.ts +++ b/src/vs/workbench/api/node/extHostFileSystem.ts @@ -69,8 +69,8 @@ class FileSystemProviderShim implements vscode.FileSystemProvider2 { stat(resource: vscode.Uri): Thenable { return this._delegate.stat(resource); } - move(resource: vscode.Uri, target: vscode.Uri): Thenable { - return this.move(resource, target); + rename(oldUri: vscode.Uri, newUri: vscode.Uri): Thenable { + return this._delegate.move(oldUri, newUri); } readdir(resource: vscode.Uri): Thenable<[vscode.Uri, vscode.FileStat][]> { return this._delegate.readdir(resource); @@ -186,8 +186,8 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape { $delete(handle: number, resource: UriComponents): TPromise { return asWinJsPromise(token => this._fsProvider.get(handle).delete(URI.revive(resource), { recursive: true })); } - $move(handle: number, resource: UriComponents, target: UriComponents): TPromise { - return asWinJsPromise(token => this._fsProvider.get(handle).move(URI.revive(resource), URI.revive(target))); + $move(handle: number, oldUri: UriComponents, newUri: UriComponents): TPromise { + return asWinJsPromise(token => this._fsProvider.get(handle).rename(URI.revive(oldUri), URI.revive(newUri))); } $mkdir(handle: number, resource: UriComponents): TPromise { return asWinJsPromise(token => this._fsProvider.get(handle).create(URI.revive(resource), { type: FileType.Dir }));