napi-rs/cli/src/utils.ts

9 lines
340 B
TypeScript
Raw Normal View History

import { readFile, writeFile, exists, copyFile, unlink } from 'fs'
2020-09-04 17:22:15 +09:00
import { promisify } from 'util'
export const readFileAsync = promisify(readFile)
export const writeFileAsync = promisify(writeFile)
export const existsAsync = promisify(exists)
export const unlinkAsync = promisify(unlink)
export const copyFileAsync = promisify(copyFile)