aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/deploy/src/utils/fs_wrapper.ts
blob: 6b4fd625cbbce12d7556d0ceab58b9c9e3984e79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import promisify = require('es6-promisify');
import * as fs from 'fs';

export const fsWrapper = {
    readdirAsync: promisify(fs.readdir),
    readFileAsync: promisify(fs.readFile),
    writeFileAsync: promisify(fs.writeFile),
    mkdirAsync: promisify(fs.mkdir),
    doesPathExistSync: fs.existsSync,
    removeFileAsync: promisify(fs.unlink),
};