fs.writeFile behaviour not consistent with fs.write functions. #657

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@sciolist

the write and writeSync methods both convert nonbuffer data to be written to a string when called, while writeFile and writeFileSync do not (the data is instead passed directly to the buffer constructor.) It seems inconsistent that

fs.write(f, 1234, ...);

should produce different results than

fs.writeFile("out", 1234, ...);

seeing as how the created buffer from inside the function is never accessible to the caller.

@isaacs
isaacs commented Feb 11, 2011

+1

@koichik koichik closed this in 96bb97e Jul 23, 2011
@koichik
koichik commented Jul 23, 2011

Thanks!

@koichik
koichik commented Jul 23, 2011

Ouch! I forgot confirmation of the CLA.
@sciolist, can you sign it?

@koichik koichik reopened this Jul 23, 2011
@sciolist

Hrm, I signed it before after making the pull request. Resubmitted now.

On Sat, Jul 23, 2011 at 1:26 PM, koichik <
reply@reply.github.com>wrote:

Ouch! I forgot confirmation of the CLA.
@sciolist, can you sign it?

Reply to this email directly or view it on GitHub:
#657 (comment)

@koichik koichik closed this in fa829b0 Jul 23, 2011
@koichik
koichik commented Jul 23, 2011

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment