2.0.1 • Published 5 months ago

@putout/cli-filesystem v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@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

2.0.1

5 months ago

2.0.0

5 months ago

1.6.0

5 months ago

1.5.0

6 months ago

1.4.0

6 months ago

1.3.0

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago