mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
💄
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user