You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
820 B

# Node.js: fs-extra
13 years ago
This module simply patches the Node.js 'fs' object with extra methods.
## Installation
13 years ago
npm install fs-extra
13 years ago
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`
13 years ago
## Usage
13 years ago
```javascript
13 years ago
fs = require('fs-extra')
```
Note that you can still use all of the [vanilla Node.js file methods][1].
13 years ago
## Methods
13 years ago
```javascript
13 years ago
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
```
13 years ago
## License
13 years ago
(The MIT License)
Copyright (c) 2011 JP Richardson
[1]: http://nodejs.org/docs/latest/api/fs.html