On Tue, Jul 02, 2013 at 04:05:18PM +0200, Camillo Bruni wrote:
> 
> On 2013-07-02, at 16:05, Goubier Thierry <thierry.goub...@cea.fr> wrote:
> 
> > 
> > 
> > Le 02/07/2013 15:49, Goubier Thierry a ?crit :
> >> Done:
> >> 
> >> SLICE-Issue-11102-FileSystemError-Path--root-ThierryGoubier.1
> >> 
> >> In http://ss3.gemstone.com/ss/PharoInbox
> >> 
> >> (It's for 2.0 at the moment. I'll try on 3.0 to port the same code).
> > 
> > Oh, it has a problem with utf8 :(
> 
> and most probably it won't work under OSX.
> 
> I think you have to implement these primitives on the different platform 
> specific stores,
> that implies a separate version for win/mac/linux

Both the concept and the implementation will be different on Windows,
but for Unix and OS X you can use this for reference:

UnixOSProcessPlugin>>primitiveFileStat
        "Call stat(2) to obtain the file protection mask for a file. Answer 
errno on failure,
        or on success answer an array with: UID with: GID with: protectionMask. 
The     
        protectionMask is an Array of four integers representing the protection 
mask, or
        answer errno on failure. The protection mask is four Integers, each of 
which may
        be considered an octal digit (0-7), with bit values 4, 2, and 1. The 
first digit selects
        the set user ID (4) and set group ID (2) and save text image (1) 
attributes. The second
        digit selects permissions for the user who owns the file: read (4), 
write (2), and
        execute (1); the third selects permissions for other users in the 
file's group, with
        the same values; and the fourth for other users not in the file's 
group, with the
        same values."

For example:

  OSProcess accessor fileStat: '/etc/hosts'

Dave


Reply via email to