[Vm-dev] Cog VM FilePlugin issue

Esteban Lorenzano estebanlm at gmail.com
Fri Apr 10 09:29:54 UTC 2015


> On 10 Apr 2015, at 09:37, Nicolai Hess <nicolaihess at web.de> wrote:
> 
> 
> 
> 2015-04-10 5:30 GMT+02:00 Phil (list) <pbpublist at gmail.com <mailto:pbpublist at gmail.com>>:
> 
> It appears that there's a behavior difference between recent Cog and
> Pharo/Seaside (which I assume is just the Squeak VM?)
> 
> No, it is pharo only.
> Pharo changed the fileplugin because it has a different abstraction
> for the platform file system.
> Instead of the squeak classes FileDirectory/DirectoryEntry...
> it uses the newer in FileSystem-/Disk/Store/Memory.
> 
> This File API and the underlaying FilePlugin provide
> more file attributes (Permissions and isSymlink)
> 
>  
> VMs: <primitive:
> 'primitiveDirectoryEntry' module: 'FilePlugin'> returns 5 values in Cog
> and 7 in Squeak.  The 6th value are the file permissions and the 7th is
> a boolean (haven't looked to see what it represents).
> 
> I noticed this with some Pharo and Seaside images when attempting to
> open the world menu -> Tools -> File Browser which results in an error
> under Cog.  The cause is DiskStore #basicEntryAt: returning 2 additional
> values that Cog currently does not:
> 
> [plug := FilePluginPrims new.
>         path := AbsolutePath from: '/tmp'.
>         ds := DiskStore current.
>         ds basicEntryAt: path] value.
> 
> 
> Squeak VM returns:  #('tmp' 3606072933 <tel:3606072933> 3606072933 <tel:3606072933> true 0 511 false)
as Nicolai said, this is not the squeak vm but the pharo vm (which is a Cog, too). 

> Cog VM returns:  #('tmp' 3606072933 <tel:3606072933> 3606072933 <tel:3606072933> true 0)
> 
> These results were obtained using the VMs from
> http://www.seaside.st/distributions/Seaside-3.1-OneClick-Pharo2.zip <http://www.seaside.st/distributions/Seaside-3.1-OneClick-Pharo2.zip> and
> http://www.mirandabanda.org/files/Cog/VM/VM.r3308/coglinux-15.14.3308.tgz <http://www.mirandabanda.org/files/Cog/VM/VM.r3308/coglinux-15.14.3308.tgz>
> 
> I'm assuming this is not an intentional behavior difference.  But if it
> is, any details as to why would be appreciated…
we added posix permissions and symlink flag. 
and we changed it not because we have a different abstraction, we changed because information was not enough. 
we will add also owner and group soon also, but most probably it will be 

cheers, 
Esteban

> 
> Thanks,
> Phil
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150410/959dd07f/attachment-0001.htm


More information about the Vm-dev mailing list