@putout/cli-filesystem

2.0.1 • Public • Published

@putout/cli-filesystem NPM version

API to lint filesystem.

Install

npm i @putout/cli-filesystem

API

renameFile(from: string, to: string)

renameFile('/hello/world.txt', '/hello/hello.txt');

removeFile(filename: string)

removeFile('/hello/world.txt');

copyFile(from: string, to: string)

copyFile('/hello/world.txt', '/hello/hello.txt');

createDirectory(name: string)

createDirectory('/hello/world');

readFileContent(name: string)

readFileContent('/hello/world');
// returns
'hello';

writeFileContent(name: string, content: string)

If parent directory not exists - creates it.

writeFileContent('/hello/world', 'hello');
readFileContent('/hello/world');
// returns
'hello';

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @putout/cli-filesystem

Weekly Downloads

1,936

Version

2.0.1

License

MIT

Unpacked Size

4.58 kB

Total Files

4

Last publish

Collaborators

  • coderaiser