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

fs.extra

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs.extra

fs.move and fs.copy for Node.JS

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
86K
increased by4.58%
Maintainers
1
Weekly downloads
 
Created
Source

fs.extra

Adds fs.move and fs.copy to Node.JS' fs.

var fs = require('fs.extra');

fs.copy

Creates an fs.readStream and fs.writeStream and uses util.pump to efficiently copy.

fs.copy('foo.txt', 'bar.txt', function (err) {
  if (err) {
    throw err;
  }

  console.log("Copied 'foo.txt' to 'bar.txt');
});

fs.move

Attempts fs.rename, then tries fs.copy/fs.unlink before failing.

fs.move('foo.txt', 'bar.txt', function (err) {
  if (err) {
    throw err;
  }

  console.log("Moved 'foo.txt' to 'bar.txt');
});

FAQs

Package last updated on 10 Nov 2011

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