$ gnpm install promise-fs
Wraps FS methods using Promise
You can install this module using Yarn:
yarn add promise-fs
npm install promise-fs
import fs from "promise-fs"
fs.readFile("path/to/file")
.then(content => console.log(String(content))) // Do something with the content
.catch(err => console.log(err)) // Handle error
access, readFile, writeFile, close, open, read, write, rename, rmdir, mkdir, readdir, stat, lstat, fstat, appendFile, realpath, link, unlink, readlink, chmod, fchmod, chown, fchown, lchown, fsync, utimes, futimes, ftruncate
MIT
Copyright 2013 - present © cnpmjs.org | Home |