blob: cc7b06175d0097d57a2945cc19bc620e4e78eb3d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { promisify } from '@0xproject/utils';
import * as fs from 'fs';
import * as mkdirp from 'mkdirp';
export const fsWrapper = {
readdirAsync: promisify<string[]>(fs.readdir),
readFileAsync: promisify<string>(fs.readFile),
writeFileAsync: promisify<undefined>(fs.writeFile),
mkdirpAsync: promisify<undefined>(mkdirp),
doesPathExistSync: fs.existsSync,
rmdirSync: fs.rmdirSync,
removeFileAsync: promisify<undefined>(fs.unlink),
};
|