2012-05-31 09:52:33 -05:00
2012-05-31 09:52:33 -05:00
2012-05-31 09:52:33 -05:00
2012-05-31 09:52:33 -05:00
2011-11-16 15:47:40 -06:00
2012-03-14 16:13:37 -05:00
2012-03-14 16:13:37 -05:00
2011-11-16 15:47:40 -06:00
2012-05-30 16:14:33 -05:00
2012-05-30 11:32:15 -05:00

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

Dual licensed under MIT and Apache v2

Copyright (c) 2011-2012 JP Richardson

Description
Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
Readme MIT 2.6 MiB
Languages
JavaScript 100%