Socket
Socket
Sign inDemoInstall

@putout/cli-filesystem

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/cli-filesystem

API to help lint filesystem


Version published
Weekly downloads
1.9K
increased by39.65%
Maintainers
1
Install size
4.48 kB
Created
Weekly downloads
 

Readme

Source

@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

Keywords

FAQs

Last updated on 23 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc