primitiveFileSize on mac/unix

John M McIntosh johnmci at smalltalkconsulting.com
Mon May 2 14:10:56 UTC 2005


FileDirectory>>primitiveDirectoryLookup
Uses directory based calls to return information about files in that  
directory.


On May 2, 2005, at 4:33 AM, Avi Bryant wrote:

> I think this may have come up before, but: on the Unix or Mac (Carbon)
> VMs, a FileStream will always return the #size it had when it was
> opened, or the last time that FileStream instance was written to - it
> doesn't notice if some other process or even some other FileStream
> instance appends to the file.  It will happily read those bytes,
> however, which means that it's possible for "file position > file size
> and: [file next notNil]" to be true, which seems rather inconsistent.
>
> Right now the only way to find out the true size of a file is to open
> a new FileStream on it, which is a pretty expensive way to do it.
>
> Is there any reason it has to be this way?  Is there any chance we can  
> fix it?
>
> Avi
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list