@@ -7,7 +7,7 @@ import * as path from 'path';
77import * as net from 'net' ;
88import * as os from 'os' ;
99
10- import { readLocalFile , writeLocalFile , mkdirpLocal , isLocalFile , renameLocal , readLocalDir , isLocalFolder } from '../spec-utils/pfs' ;
10+ import { readLocalFile , writeLocalFile , mkdirpLocal , isLocalFile , renameLocal , readLocalDir , isLocalFolder , rmLocal , cpLocal } from '../spec-utils/pfs' ;
1111import { URI } from 'vscode-uri' ;
1212import { ExecFunction , getLocalUsername , plainExec , plainPtyExec , PtyExecFunction } from './commonUtils' ;
1313import { Abort , Duplex , Sink , Source , SourceCallback } from 'pull-stream' ;
@@ -32,7 +32,9 @@ export interface CLIHost {
3232 isFolder ( filepath : string ) : Promise < boolean > ;
3333 readFile ( filepath : string ) : Promise < Buffer > ;
3434 writeFile ( filepath : string , content : Buffer ) : Promise < void > ;
35+ copyFile ( oldPath : string , newPath : string ) : Promise < void > ;
3536 rename ( oldPath : string , newPath : string ) : Promise < void > ;
37+ remove ( filepath : string ) : Promise < void > ;
3638 mkdirp ( dirpath : string ) : Promise < void > ;
3739 readDir ( dirpath : string ) : Promise < string [ ] > ;
3840 readDirWithTypes ?( dirpath : string ) : Promise < [ string , FileTypeBitmask ] [ ] > ;
@@ -76,7 +78,9 @@ function createLocalCLIHostFromExecFunctions(localCwd: string, exec: ExecFunctio
7678 isFolder : isLocalFolder ,
7779 readFile : readLocalFile ,
7880 writeFile : writeLocalFile ,
81+ copyFile : cpLocal ,
7982 rename : renameLocal ,
83+ remove : async ( filepath ) => rmLocal ( filepath , { force : true } ) ,
8084 mkdirp : async ( dirpath ) => {
8185 await mkdirpLocal ( dirpath ) ;
8286 } ,
0 commit comments