diff options
Diffstat (limited to 'packages/deployer/src/utils/fs_wrapper.ts')
-rw-r--r-- | packages/deployer/src/utils/fs_wrapper.ts | 11 |
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), +}; |