Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-jetpack

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-jetpack

Better file system API

  • 5.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
434K
decreased by-9.03%
Maintainers
1
Weekly downloads
 
Created

What is fs-jetpack?

fs-jetpack is a file system utility library for Node.js that simplifies common file system operations. It provides a more intuitive and chainable API compared to the built-in 'fs' module, making it easier to perform tasks like reading, writing, copying, and deleting files and directories.

What are fs-jetpack's main functionalities?

Reading Files

This feature allows you to read the contents of a file. The 'read' method takes the file path and encoding as arguments and returns the file content.

const jetpack = require('fs-jetpack');
const data = jetpack.read('path/to/file.txt', 'utf8');
console.log(data);

Writing Files

This feature allows you to write data to a file. The 'write' method takes the file path and the data to be written as arguments.

const jetpack = require('fs-jetpack');
jetpack.write('path/to/file.txt', 'Hello, world!');

Copying Files and Directories

This feature allows you to copy files or directories from one location to another. The 'copy' method takes the source path and the destination path as arguments.

const jetpack = require('fs-jetpack');
jetpack.copy('path/to/source', 'path/to/destination');

Deleting Files and Directories

This feature allows you to delete files or directories. The 'remove' method takes the path of the file or directory to be deleted as an argument.

const jetpack = require('fs-jetpack');
jetpack.remove('path/to/file_or_directory');

Inspecting Files and Directories

This feature allows you to get information about a file or directory. The 'inspect' method takes the path as an argument and returns an object with details like size, type, and modification time.

const jetpack = require('fs-jetpack');
const info = jetpack.inspect('path/to/file_or_directory');
console.log(info);

Other packages similar to fs-jetpack

Keywords

FAQs

Package last updated on 24 Oct 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc