Skip to content
coderaiserPublic

About

📁 FLOP - Folder operations module

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Latest commit

 

History

330 Commits

Folders and files

Repository files navigation

Flop License NPM version Build Status

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 an ESM module if install with

npm i flop

API

create

Create new directory.

import * as flop from 'flop';

await flop.create('./hello/world/from/flop');

read

Read content of directory with permisions and sizes.

Parameters:

  • path
  • type or options (optional)

Posible type:

  • raw
  • size
  • size raw
import * as flop from 'flop';

await flop.read('.');
await flop.read('.', {
    sort: 'size',
});
await flop.read('.', 'raw');
await flop.read('.', 'size');
await flop.read('.', 'size raw');

copy

import * as flop from 'flop';

await flop.copy('from', 'to');

move

import * as flop from 'flop';

await flop.move('from', 'to');

remove

import * as flop from 'flop';

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

License

MIT

About

📁 FLOP - Folder operations module

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages