Skip to content

Commit

Permalink
move -> rename, #47475
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Apr 9, 2018
1 parent 51a87a5 commit 733f8f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,17 @@ declare module 'vscode' {

readonly onDidChange?: Event<FileChange[]>;

stat(resource: Uri, token: CancellationToken): Thenable<FileStat>;
stat(uri: Uri, token: CancellationToken): Thenable<FileStat>;

readdir(resource: Uri, token: CancellationToken): Thenable<[Uri, FileStat][]>;
readdir(uri: Uri, token: CancellationToken): Thenable<[Uri, FileStat][]>;

readFile(resource: Uri, token: CancellationToken): Thenable<Uint8Array>;
readFile(uri: Uri, token: CancellationToken): Thenable<Uint8Array>;

writeFile(resource: Uri, content: Uint8Array, token: CancellationToken): Thenable<void>;
writeFile(uri: Uri, content: Uint8Array, token: CancellationToken): Thenable<void>;

// todo@remote
// Thenable<FileStat>
move(resource: Uri, target: Uri): Thenable<FileStat>;
rename(oldUri: Uri, newUri: Uri): Thenable<FileStat>;

// todo@remote
// helps with performance bigly
Expand Down
8 changes: 4 additions & 4 deletions src/vs/workbench/api/node/extHostFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class FileSystemProviderShim implements vscode.FileSystemProvider2 {
stat(resource: vscode.Uri): Thenable<vscode.FileStat> {
return this._delegate.stat(resource);
}
move(resource: vscode.Uri, target: vscode.Uri): Thenable<vscode.FileStat> {
return this.move(resource, target);
rename(oldUri: vscode.Uri, newUri: vscode.Uri): Thenable<vscode.FileStat> {
return this._delegate.move(oldUri, newUri);
}
readdir(resource: vscode.Uri): Thenable<[vscode.Uri, vscode.FileStat][]> {
return this._delegate.readdir(resource);
Expand Down Expand Up @@ -186,8 +186,8 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
$delete(handle: number, resource: UriComponents): TPromise<void, any> {
return asWinJsPromise(token => this._fsProvider.get(handle).delete(URI.revive(resource), { recursive: true }));
}
$move(handle: number, resource: UriComponents, target: UriComponents): TPromise<IStat, any> {
return asWinJsPromise(token => this._fsProvider.get(handle).move(URI.revive(resource), URI.revive(target)));
$move(handle: number, oldUri: UriComponents, newUri: UriComponents): TPromise<IStat, any> {
return asWinJsPromise(token => this._fsProvider.get(handle).rename(URI.revive(oldUri), URI.revive(newUri)));
}
$mkdir(handle: number, resource: UriComponents): TPromise<IStat, any> {
return asWinJsPromise(token => this._fsProvider.get(handle).create(URI.revive(resource), { type: FileType.Dir }));
Expand Down

0 comments on commit 733f8f6

Please sign in to comment.