From: Sean O'Dell Date: 2004-06-20T04:39:54+09:00 Subject: Re: [RCR] IO#readn On Saturday 19 June 2004 11:58, Reimer Behrends wrote: > Sean O'Dell (sean@celsoft.com) wrote: > [...] > > > I agree, a method called to read n bytes should raise an exception when > > it cannot. > > Except that the semantics of read() specify that _at most_ n bytes will > be read. There are important cases where you want these semantics, such > as when reading from a non-blocking socket or pipe or when reading a > file in chunks without wanting to bother to find out what exactly the > size of the last chunk will be (which can be impossible if the file is > not seekable). Yep, you're right...I guess that would apply even in a scripted environment. Sean O'Dell