flop

FLOP - simple FoLder OPerations

#flop

FLOP - Folder operations module.

For use as application you could use global install.

npm i flop -g

If you run flop -h you will see:

flop - folder operations module.
options:
-h, --help - show this message
-r, --read - get directory content

Also you can use flop as a module if install with

npm i flop

Create new directory.

var flop = require('flop');
 
flop.create('./hello/world/from/flop', function(errordata) {
    console.log(error, data);
});

Read content of directory with permisions and sizes.

Parameters:

  • path
  • options (optional)
  • callback

Posible options:

  • time
  • size
  • size raw
var flop = require('flop');
 
flop.read('.', function(errordata) {
    console.log(error, data);
});
 
flop.read('.', 'time', function(errordata) {
    console.log(error, data);
});
 
flop.read('.', 'size', function(errordata) {
    console.log(error, data);
});
 
flop.read('.', 'size raw', function(errordata) {
    console.log(error, data);
});
var flop = require('flop');
 
flop.copy('from', 'to', function(error) {
    console.log(error);
});
var flop = require('flop');
 
flop.move('from', 'to', function(error) {
    console.log(error);
});
flop.delete('path/to/delete', function(error) {
    console.log(error);
});
 
flop.delete('path/to/delete', ['folder1', 'folder2'], function(error) {
    console.log(error);
});

MIT