RFD: deprecate permissions-related stuff in System.Directory
Malcolm.Wallace at cs.york.ac.uk
Wed Aug 29 08:55:46 EDT 2007
Simon Marlow <simonmarhaskell at gmail.com> wrote some fairly convincing
arguments against the universal use of get/setPermissions:
> These functions are hardly ever used.
> There are a few more uses of `getPermissions`, but as pointed out
> above, these are usually flawed. In any case they can usually be
> replaced by openFile.
I have a perfectly OK use of getPermissions: in hmake, there is a
routine that scans the PATH variable looking for an executable with a
given name. Basically, it is a Haskell implementation of the unix
'which' command. There is no actual use of the executable, just a test
to report/reject the candidate pathname.
More information about the Libraries