Package Exports
- fs-extra
- fs-extra/lib
- fs-extra/lib/copy
- fs-extra/lib/remove
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fs-extra) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node.js: fs-extra
This module simply patches the Node.js 'fs' object with extra methods.
Installation
npm install --production fs-extra
Make sure that you run the test script to verify that it works on your system.
Navigate to the directory for the module and run: make test
Usage
fs = require('fs-extra')
Note that you can still use all of the vanilla Node.js file methods.
Methods
fs.copyFileSync(srcFile, destFile) //synchronously copies a file
fs.copyFile(srcFile, destFile, function(err)) //asynchronously copies a file
fs.rmrfSync(dir) //recursively deletes directory, like rm -rf on Unix
fs.rmrf(dir, callback) //asynchronous version as before
License
(The MIT License)
Copyright (c) 2011 JP Richardson