Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/prelude/Directory/SetPermissions_.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


module Directory (setPermissions) where

import NHC.GreenCard
import PatchIOError
import DPermissions


foreign import ccall hs_setperms :: Bool -> Bool -> Bool -> Bool -> PackedString -> IO Int

setperms :: Permissions -> FilePath -> IO Int
setperms tmp1 tmp2 =
  do let (r,w,x,s) = fromPerm tmp1
     let fp = toCString tmp2
     hs_setperms r w x s fp



setPermissions :: FilePath -> Permissions -> IO ()
setPermissions fp ps = patchIOErrorF "setPermissions" fp (setperms ps)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.