[nodejs] Re: partial reads fs.read, partial writes and fs.write

2012-05-23 Thread Bert Belder
> > That is, can these functions get interrupted and not fill the entire buffer, > > even if there are bytes available to fill the entire buffer? > > Yes, that's certainly possible. But does it actually happen? If so, that sucks. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https:/

Re: [nodejs] Re: partial reads fs.read, partial writes and fs.write

2012-05-23 Thread Isaac Schlueter
Yes, it happens. In fact, it can happen quite often when you'er doing a lot of large-ish reads and writes in parallel, and if you don't account for it, then it does indeed suck. That's why we have the fs.readFile and fs.writeFile functions for the use case where you can store the entire file in m

Re: [nodejs] Re: partial reads fs.read, partial writes and fs.write

2012-05-23 Thread Alan Gutierrez
On 5/23/12 11:10 AM, Isaac Schlueter wrote: Yes, it happens. In fact, it can happen quite often when you'er doing a lot of large-ish reads and writes in parallel, and if you don't account for it, then it does indeed suck. That's why we have the fs.readFile and fs.writeFile functions for the use

Re: [nodejs] Re: partial reads fs.read, partial writes and fs.write

2012-05-23 Thread Mark Hahn
Isn't is standard for the app to be required to handle any possible value of bytes read? Isn't that the posix convention? There is no harm in reminding everyone of this, but they should already know it. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wi