File system model (was: UnixFileDirectoryPlugin)

Tim Rowledge tim at sumeru.stanford.edu
Fri Jan 18 19:02:36 UTC 2002


"Lex Spoon" <lex at cc.gatech.edu> is widely believed to have written:

> > file testing (existence, size, permissions, date etc)
> 
> Agreed, except for permissions.  What's the cross-platform version of
> it?
The smallest form of permissions I've ever found is 'write permission
yes-or-no'.  Some flexible way of handling cases where the referenced
permission has any meaning is needed. 

> Simple is very good....  Also, not *every* platform will have links, so
> it would suck if code starts relying on their presence.
Indeed - this is the classic sort of LCD problem. The first (partial)
solution that comes to mind is to specify it as linkOrCopy:to: and just
put up with the (hopefully) minor irritation that having no links would
cause. 
> 
> 
> > read, write, append, truncate
> > multiple access - one of my pet peeves is (ab)using files by just
> > opening them several times.
> 
> What do you mean by multiple access?
e.g. the changes file is open and you do something like 'recent log
file' which simply opens the changes file - again - and relies on the OS
accepting that. Not all OS's allow that and it makes several
tools unusable. Since we already register files when they are opened,
why not grab a copy of the file accessor and re-use it? Yes, it is
possible there is code that would need to change to make read/write be
idempotent, but I rather think it can be done. Probably something to do
with the fact that I've done it a couple of times in the past for odd
OSs.

ti

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange Opcodes: ZZZZZZZZZZZZ: enter sleep mode




More information about the Squeak-dev mailing list