From 5e78f57087908005a274fd3f58c316be5d8b23f4 Mon Sep 17 00:00:00 2001 From: Trevor Burnham Date: Sat, 19 Mar 2011 10:27:25 -0400 Subject: [PATCH] Doc fix for fs.write Closes GH-808 Closes GH-811 --- doc/api/fs.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 0b06533..00a347a 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -230,6 +230,10 @@ See pwrite(2). The callback will be given two arguments `(err, written)` where `written` specifies how many _bytes_ were written. +Note that it is unsafe to use `fs.write` multiple times on the same file +without waiting for the callback. For this scenario, +`fs.createWriteStream` is strongly recommended. + ### fs.writeSync(fd, buffer, offset, length, position) Synchronous version of buffer-based `fs.write()`. Returns the number of bytes -- 2.7.4