1.0.0 • Published 7 years ago

enfsmove-promise v1.0.0

Weekly downloads
3
License
CC-BY-4.0
Repository
github
Last release
7 years ago

Build Status AppVeyor status Codacy Badge Donate

NPM

enfsmove-promise

Module that add move functionality to node fs module with promises

enfs stands for Easy Node 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

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.

1.0.0

7 years ago