aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@ava/write-file-atomic/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/@ava/write-file-atomic/README.md
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/@ava/write-file-atomic/README.md')
-rw-r--r--node_modules/@ava/write-file-atomic/README.md54
1 files changed, 0 insertions, 54 deletions
diff --git a/node_modules/@ava/write-file-atomic/README.md b/node_modules/@ava/write-file-atomic/README.md
deleted file mode 100644
index d74b12710..000000000
--- a/node_modules/@ava/write-file-atomic/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-write-file-atomic
------------------
-
-**Forked from https://github.com/npm/write-file-atomic to include https://github.com/npm/write-file-atomic/pull/25, for
-use with [AVA](https://github.com/avajs/ava/).**
-
----
-
-This is an extension for node's `fs.writeFile` that makes its operation
-atomic and allows you set ownership (uid/gid of the file).
-
-### var writeFileAtomic = require('write-file-atomic')<br>writeFileAtomic(filename, data, [options], callback)
-
-* filename **String**
-* data **String** | **Buffer**
-* options **Object**
- * chown **Object**
- * uid **Number**
- * gid **Number**
- * encoding **String** | **Null** default = 'utf8'
- * fsync **Boolean** default = true
- * mode **Number** default = 438 (aka 0666 in Octal)
-callback **Function**
-
-Atomically and asynchronously writes data to a file, replacing the file if it already
-exists. data can be a string or a buffer.
-
-The file is initially named `filename + "." + murmurhex(__filename, process.pid, ++invocations)`.
-If writeFile completes successfully then, if passed the **chown** option it will change
-the ownership of the file. Finally it renames the file back to the filename you specified. If
-it encounters errors at any of these steps it will attempt to unlink the temporary file and then
-pass the error back to the caller.
-
-If provided, the **chown** option requires both **uid** and **gid** properties or else
-you'll get an error.
-
-The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.
-
-If the **fsync** option is **false**, writeFile will skip the final fsync call.
-
-The callback is always invoked with the initial (temporary) filename.
-
-Example:
-
-```javascript
-writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {
- if (err) throw err;
- console.log('It\'s saved!');
-});
-```
-
-### var writeFileAtomicSync = require('write-file-atomic').sync<br>writeFileAtomicSync(filename, data, [options])
-
-The synchronous version of **writeFileAtomic**. Returns the initial (temporary) filename.