0.1.1 • Published 5 years ago

lite-fs-promise v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

lite-fs-promise

Wrap fs module to promise

Usage

  • Just use it as fs module

  • For asynchronous functions list below, use them in either original callback way like:

const fs = require('fs-promise')

fs.foo(arg1, arg2, (err, arg) => {

})

or Promise way like:

const fs = require('fs-promise')

fs.foo(arg1, arg2)
.then((err, arg) => {

})

Promise function list:

  • access
  • appendFile
  • chmod
  • chown
  • close
  • copyFile
  • exists
  • fchmod
  • fchown
  • fdatasync
  • fstat
  • fsync
  • ftruncate
  • futimes
  • lchmod
  • lchown
  • link
  • lstat
  • mkdir
  • mkdtemp
  • open
  • read
  • readdir
  • readFile
  • readlink
  • realpath
  • rename
  • rmdir
  • stat
  • symlink
  • truncate
  • unlink
  • utimes
  • write
  • write
  • writeFile