mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
💄, #47475
This commit is contained in:
parent
da79ed6bb2
commit
b21e8d48fb
3 changed files with 4 additions and 9 deletions
|
@ -164,21 +164,16 @@ export interface IStat {
|
|||
}
|
||||
|
||||
export interface IFileSystemProvider {
|
||||
|
||||
onDidChange?: Event<IFileChange[]>;
|
||||
|
||||
// more...
|
||||
//
|
||||
onDidChange: Event<IFileChange[]>;
|
||||
stat(resource: URI): TPromise<IStat>;
|
||||
readFile(resource: URI): TPromise<Uint8Array>;
|
||||
writeFile(resource: URI, content: Uint8Array): TPromise<void>;
|
||||
move(from: URI, to: URI): TPromise<IStat>;
|
||||
rename(from: URI, to: URI): TPromise<IStat>;
|
||||
mkdir(resource: URI): TPromise<IStat>;
|
||||
readdir(resource: URI): TPromise<[string, IStat][]>;
|
||||
delete(resource: URI): TPromise<void>;
|
||||
}
|
||||
|
||||
|
||||
export enum FileOperation {
|
||||
CREATE,
|
||||
DELETE,
|
||||
|
|
|
@ -110,7 +110,7 @@ class RemoteFileSystemProvider implements IFileSystemProvider {
|
|||
delete(resource: URI): TPromise<void, any> {
|
||||
return this._proxy.$delete(this._handle, resource);
|
||||
}
|
||||
move(resource: URI, target: URI): TPromise<IStat, any> {
|
||||
rename(resource: URI, target: URI): TPromise<IStat, any> {
|
||||
return this._proxy.$move(this._handle, resource, target);
|
||||
}
|
||||
mkdir(resource: URI): TPromise<IStat, any> {
|
||||
|
|
|
@ -410,7 +410,7 @@ export class RemoteFileService extends FileService {
|
|||
: TPromise.as(null);
|
||||
|
||||
return prepare.then(() => this._withProvider(source)).then(provider => {
|
||||
return provider.move(source, target).then(stat => {
|
||||
return provider.rename(source, target).then(stat => {
|
||||
return toIFileStat(provider, [target, stat]);
|
||||
}).then(fileStat => {
|
||||
this._onAfterOperation.fire(new FileOperationEvent(source, FileOperation.MOVE, fileStat));
|
||||
|
|
Loading…
Reference in a new issue