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

temp-fs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temp-fs

Temporary files, directories or names!

  • 0.9.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
355K
increased by4.77%
Maintainers
1
Weekly downloads
 
Created

What is temp-fs?

The 'temp-fs' npm package provides a simple and efficient way to create and manage temporary files and directories. It is particularly useful for applications that need to handle temporary data storage, such as during testing or when processing files that do not need to be permanently stored.

What are temp-fs's main functionalities?

Create Temporary File

This feature allows you to create a temporary file. The file will be automatically deleted when the process exits.

const temp = require('temp-fs');

const tempFile = temp.createFile();
console.log('Temporary file created at:', tempFile.path);

Create Temporary Directory

This feature allows you to create a temporary directory. The directory will be automatically deleted when the process exits.

const temp = require('temp-fs');

const tempDir = temp.createDir();
console.log('Temporary directory created at:', tempDir.path);

Custom Cleanup

This feature allows you to create temporary files or directories with custom cleanup options. You can choose to keep the file or directory and manually clean it up later.

const temp = require('temp-fs');

const tempFile = temp.createFile({ keep: true });
console.log('Temporary file created at:', tempFile.path);

// Manually cleanup
tempFile.cleanupSync();

Other packages similar to temp-fs

Keywords

FAQs

Package last updated on 18 Mar 2016

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