Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

coderaiser/flop

Repository files navigation

FLOP - Folder operations module.

Install

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

API

create

Create new directory.

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

read

Read content of directory with permisions and sizes.

Parameters:

  • path
  • type (optional)
  • options (optional)

Posible type:

  • raw
  • size
  • size raw
const flop = require('flop');
await flop.read('.');
await flop.read('.', {
 sort: 'size',
});
await flop.read('.', 'raw');
await flop.read('.', 'size');
await flop.read('.', 'size raw');

copy

const flop = require('flop');
await flop.copy('from', 'to');

move

const flop = require('flop');
await flop.move('from', 'to');

remove

await flop.remove('path/to/remove');
await flop.remove('path/to/remove', ['folder1', 'folder2']);

License

MIT

About

πŸ“ FLOP - Folder operations module

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /