enfsmove-promisedeprecated

move files and directories in the file system for node with promises

Usage no npm install needed!

<script type="module">
  import enfsmovePromise from 'https://cdn.skypack.dev/enfsmove-promise';
</script>

README

Build Status AppVeyor status Codacy Badge Donate

NPM

enfsmove-promise

Module that add move functionality to node fs module with promises

enfs stands for [E]asy [N]ode [fs]

This module is intended to work as a sub-module of enfs

Description

This module will add a method that allows moving files and directories in the file system.

  • This module will add following methods to node fs module:
    • move

Usage

enfsmove-promise

    const enfsmove = require("enfsmove-promise");

Additional Methods

moveP

  • moveP(srcPath, dstPatch, [options])

Move files and directories in the file system

[options]:

  • fs (Object): an alternative fs module to use (default will be enfspatch)
  • mkdirp (Boolean): if true will create new directories instead of copying the old ones (default: false)
  • overwrite (Boolean): if true will overwrite items at destination if they exist (Default: false)
  • limit (Number): the maximum number of items being moved at a moment (Default: 512)
    enfsmove.moveP("/home/myHome","/home/myOtherHome").then(function(){
        console.log("Everything moved correctly");
    }).catch(function(){
        console.log("Error occurred while moving.");
    });

License

Creative Commons Attribution 4.0 International License

Copyright (c) 2017 Joao Parreira joaofrparreira@gmail.com GitHub

This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit CC-BY-4.0.