recursive-fs
Asynchronous recursive file system operations
Last updated 4 months ago by simov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install recursive-fs 
SYNC missed versions from official npm registry.

recursive-fs

npm-version travis-ci coveralls-status

Asynchronous Recursive File System Operations

read

var rfs = require('recursive-fs')

var path = require('path')
var directory = path.resolve(process.cwd(), process.argv[2])

;(async () => {
  try {
    var {dirs, files} = await rfs.read(directory)
    console.log(dirs)
    console.log(files)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()

remove

var rfs = require('recursive-fs')

var path = require('path')
var directory = path.resolve(process.cwd(), process.argv[2])

;(async () => {
  try {
    await rfs.remove(directory)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()

copy

var rfs = require('recursive-fs')

var path = require('path')
var source = path.resolve(process.cwd(), process.argv[2])
var destination = path.resolve(process.cwd(), process.argv[3])

;(async () => {
  try {
    await rfs.copy(source, destination)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()

recursive-copy

npx recursive-copy 'path/to/source/directory' 'path/to/destination/directory'

recursive-delete

npx recursive-delete 'path/to/directory'

Current Tags

  • 2.1.0                                ...           latest (4 months ago)

11 Versions

  • 2.1.0                                ...           4 months ago
  • 2.0.0                                ...           4 months ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           4 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |