aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/utils/fs_wrapper.ts
blob: e02c83f271bf673f0da35ab3c3268b44a4b44c40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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,
    rmdirSync: fs.rmdirSync,
    removeFileAsync: promisify<undefined>(fs.unlink),
};