提交 b21e8d48 编写于 作者: J Johannes Rieken

💄, #47475

上级 da79ed6b
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册