-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
778dcb5
commit b26602f
Showing
21 changed files
with
133 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export { exists } from "./exists"; | ||
export { lstat } from "./lstat"; | ||
export { mkdir } from "./mkdir"; | ||
export { readFile } from "./read_file"; | ||
export { readdir } from "./readdir"; | ||
export { rmdir } from "./rmdir"; | ||
export { stat } from "./stat"; | ||
export { unlink } from "./unlink"; | ||
export { writeFile } from "./write_file"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { lstat as fsLstat } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const lstat = promisify(fsLstat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { mkdir as fsMkdir } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const mkdir = promisify(fsMkdir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { readFile as fsReadFile } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const readFile = promisify(fsReadFile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
import { readdir as fsReaddir } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export function readdir(path: string): Promise<string[]> { | ||
return new Promise((resolve, reject) => { | ||
fsReaddir(path, (err, files) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
|
||
resolve(files); | ||
}); | ||
}); | ||
} | ||
export const readdir = promisify(fsReaddir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { rmdir as fsRmdir } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const rmdir = promisify(fsRmdir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
import { stat as fsStat, Stats } from "original-fs"; | ||
import { stat as fsStat } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export function stat(filePath: string): Promise<Stats> { | ||
return new Promise((resolve, reject) => { | ||
fsStat(filePath, (err, stats) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
|
||
resolve(stats); | ||
}); | ||
}); | ||
} | ||
export const stat = promisify(fsStat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { unlink as fsUnlink } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const unlink = promisify(fsUnlink); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { writeFile as fsWriteFile } from "original-fs"; | ||
import { promisify } from "util"; | ||
|
||
export const writeFile = promisify(fsWriteFile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.