recursive-fs

    2.1.0 • Public • Published

    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'

    Install

    npm i recursive-fs

    DownloadsWeekly Downloads

    107,379

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    9.74 kB

    Total Files

    10

    Last publish

    Collaborators

    • simov