FileDirectory>>fileExists: (was: Re: [BUG]Unable to load BFAV, various problems )

David T. Lewis lewis at mail.msen.com
Sat Apr 17 14:58:22 UTC 2004


On Sat, Apr 17, 2004 at 07:44:12AM -0700, Ned Konz wrote:
> On Friday 16 April 2004 9:40 pm, Tim Rowledge wrote:
> > OK, I'm going to propose a couple of extensions to the FilePlugin. I'm
> > pretty sure it is possible to wrap them in such a way that older VMs
> > will be ok and of course old images on a new vm will just work as
> > before.
> 
> Let's hope so...
> 
> > I would suggest a default macro in sq.h that simply implements
> > dir_Exists as interpreterProxy->primitiveFail. Unless of course, all the
> > platformers buy into the idea really quickly and make it pointless.
> 
> Is there some way to extend the idea further to get something like stat() or 
> lstat() instead? Then we could use that for both the exists calls as well as 
> getting other file information. I know that Dave added stat or something like 
> it to his OSProcess plugin.

Sure. The stat primitives are also in DirectoryPlugin, along with some other handy
things like using directory streams to enumerate directories on Unix.

One word of warning: I haven't touched DirectoryPlugin recently, and I think
that Ian may have recently made a change to the way file time stamps are mapped
into Squeak's notion of a DirectoryEntry. I'll need to make sure my stuff
is still in sync with his (but I don't have time to look at it right now).

Dave




More information about the Squeak-dev mailing list