This commit is contained in:
Johannes Rieken 2018-04-11 16:55:18 +02:00
parent da79ed6bb2
commit b21e8d48fb
3 changed files with 4 additions and 9 deletions

View file

@ -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,

View file

@ -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> {

View file

@ -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));