This commit is contained in:
Johannes Rieken
2019-06-21 11:12:14 +02:00
parent 44596ac959
commit 293596c9af
2 changed files with 14 additions and 14 deletions

View File

@@ -86,29 +86,29 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
return (stat.isDirectory ? FileType.Directory : FileType.File) + (stat.isSymbolicLink ? FileType.SymbolicLink : 0);
}
async $readFile(resource: UriComponents): Promise<VSBuffer> {
return (await this._fileService.readFile(URI.revive(resource))).value;
async $readFile(uri: UriComponents): Promise<VSBuffer> {
return (await this._fileService.readFile(URI.revive(uri))).value;
}
async $writeFile(resource: UriComponents, content: VSBuffer, opts: FileWriteOptions): Promise<void> {
async $writeFile(uri: UriComponents, content: VSBuffer, opts: FileWriteOptions): Promise<void> {
//todo@joh honor opts
await this._fileService.writeFile(URI.revive(resource), content, {});
await this._fileService.writeFile(URI.revive(uri), content, {});
}
async $rename(resource: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
this._fileService.move(URI.revive(resource), URI.revive(target), opts.overwrite);
async $rename(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite);
}
async $copy(resource: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
this._fileService.copy(URI.revive(resource), URI.revive(target), opts.overwrite);
async $copy(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise<void> {
this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite);
}
async $mkdir(resource: UriComponents): Promise<void> {
this._fileService.createFolder(URI.revive(resource));
async $mkdir(uri: UriComponents): Promise<void> {
this._fileService.createFolder(URI.revive(uri));
}
async $delete(resource: UriComponents, opts: FileDeleteOptions): Promise<void> {
this._fileService.del(URI.revive(resource), opts);
async $delete(uri: UriComponents, opts: FileDeleteOptions): Promise<void> {
this._fileService.del(URI.revive(uri), opts);
}
}