[Vm-dev] Extending primitiveDirectoryEntry

David T. Lewis lewis at mail.msen.com
Fri Apr 21 12:13:40 UTC 2017


On Fri, Apr 21, 2017 at 11:28:09AM +0200, Esteban Lorenzano wrote:
>  
> Hi Alistair, 
> 
> in the past we extended dir_EntryLookup because a lot of important information was missing. With time, I realised that maybe it would have been better to add an extra primitive to get extended properties. 
> st_dev is not very used but I understand it can be good to have access to it. 
> 
> Then, my question now is: wouldn't be better to add an "extended properties??? primitive, to answer st_dev and others?
> 

+1

I think that is a much better approach.

Dave


> Esteban
> 
> > On 21 Apr 2017, at 10:32, Alistair Grant <akgrant0710 at gmail.com> wrote:
> > 
> > 
> > Hi All,
> > 
> > I'm in the process of making FileReference>>moveTo: work across devices.
> > To make the implementation a bit cleaner on Linux it would be nice to
> > know whether the source and destination reside on the same disk
> > filesystem.  This can be determined by comparing stat.st_dev for the
> > source file and destination directory.
> > 
> > dir_EntryLookup() in sqUnixFile.c is exposed as primitiveDirectoryEntry
> > and used by FilePluginPrims>>lookupDirectory:filename:
> > 
> > It basically does a stat() on the supplied file and returns most of the
> > resulting information.  Unfortunately st_dev isn't returned.
> > 
> > Would there be any objection to me extending the Pharo version of
> > dir_EntryLookup() to include st_dev?
> > 
> > Thanks,
> > Alistair
> > 
> 


More information about the Vm-dev mailing list