Skip to content

Commit 105397c

Browse files
committed
pfs: lstat, symlink, readlink
1 parent 558ac07 commit 105397c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/vs/base/node/pfs.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ export function stat(path: string): TPromise<fs.Stats> {
8080
return nfcall(fs.stat, path);
8181
}
8282

83+
export function lstat(path: string): TPromise<fs.Stats> {
84+
return nfcall(fs.lstat, path);
85+
}
86+
8387
export function mstat(paths: string[]): TPromise<{ path: string; stats: fs.Stats; }> {
8488
return doStatMultiple(paths.slice(0));
8589
}
@@ -96,6 +100,14 @@ export function unlink(path: string): Promise {
96100
return nfcall(fs.unlink, path);
97101
}
98102

103+
export function symlink(target: string, path: string, type?: string): TPromise<void> {
104+
return nfcall<void>(fs.symlink, target, path, type);
105+
}
106+
107+
export function readlink(path: string): TPromise<string> {
108+
return nfcall<string>(fs.readlink, path);
109+
}
110+
99111
function doStatMultiple(paths: string[]): TPromise<{ path: string; stats: fs.Stats; }> {
100112
let path = paths.shift();
101113
return stat(path).then((value) => {

0 commit comments

Comments
 (0)