[Haskell-cafe] about System.Posix.Files.fileAccess

Manlio Perillo manlio_perillo at libero.it
Thu Jan 15 05:57:35 EST 2009


Brandon S. Allbery KF8NH ha scritto:
> On 2009 Jan 14, at 9:02, Manlio Perillo wrote:
>> This is of course a personal opinion, but I think the interface of:
>> fileAccess :: FilePath -> Bool -> Bool -> Bool -> IO Bool
>> http://haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-Files.html#v:fileAccess 
>>
>>
>> is not very good.
> 
> 
> The underlying system call access() is strongly disrecommended, so it's 
> not really worth a better interface.
> 

I can't see problems with access function.

Of course it is a problem if used incorrectly:

if (access("foo", F_OK) {
     fd = open("foo", ...)
}



Manlio Perillo


More information about the Haskell-Cafe mailing list