aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/utils/fs_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/deployer/src/utils/fs_wrapper.ts')
-rw-r--r--packages/deployer/src/utils/fs_wrapper.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/deployer/src/utils/fs_wrapper.ts b/packages/deployer/src/utils/fs_wrapper.ts
new file mode 100644
index 000000000..34c7caa0e
--- /dev/null
+++ b/packages/deployer/src/utils/fs_wrapper.ts
@@ -0,0 +1,11 @@
+import { promisify } from '@0xproject/utils';
+import * as fs from 'fs';
+
+export const fsWrapper = {
+ readdirAsync: promisify<string[]>(fs.readdir),
+ readFileAsync: promisify<string>(fs.readFile),
+ writeFileAsync: promisify<undefined>(fs.writeFile),
+ mkdirAsync: promisify<undefined>(fs.mkdir),
+ doesPathExistSync: fs.existsSync,
+ removeFileAsync: promisify<undefined>(fs.unlink),
+};