import * as fs from 'fs'; export class FieUtils { public isExist(path: string): boolean { return fs.existsSync(path); } public mkdir(path: string): void { if (!this.isExist(path)) { fs.mkdirSync(path); } } public writeFile(path: string, content: string = ''): void { fs.writeFileSync(path, content, 'utf-8'); } public createWriteStream(path: string): any { return fs.createWriteStream(path); } } export const fileUtils = new FieUtils();