posix-acl-0.1.0.0: Support for Posix ACL

Safe HaskellNone

System.Posix.ACL

Contents

Description

Support for POSIX.1e Access Control Lists (ACL), defined in section 23 of the draft standard IEEE Std 1003.1e.

Synopsis

Documentation

data Permset Source

A combination of read, write and execute permissions.

Constructors

Permset 

emptyPermset :: PermsetSource

No permission.

fullPermset :: PermsetSource

Read, write and execute permissions.

unionPermsets :: Permset -> Permset -> PermsetSource

Give a permission if any of the two arguments grant that permission.

intersectPermsets :: Permset -> Permset -> PermsetSource

Give a permission if both the arguments grant that permission.

data ACL Source

Represent a valid ACL as defined in POSIX.1e. The Show instance is defined to output the Long Text Form of the ACL (section 23.3.1), while the Read instance is defined to be able to parse both the long and short text form.

Instances

longTextForm :: ACL -> StringSource

Convert an ACL to its Long Text Form (see section 23.3.1 of IEEE Std 1003.1e).

shortTextFrom :: ACL -> StringSource

Convert an ACL to its Short Text Form (see section 23.3.2 of IEEE Std 1003.1e).

Get and set ACLs

getACL :: FilePath -> IO ACLSource

Retrieve the ACL from a file.

getDefaultACL :: FilePath -> IO ACLSource

Retrieve the default ACL from a directory.

fdGetACL :: Fd -> IO ACLSource

Retrieve the ACL from a file, given its file descriptor.

setACL :: FilePath -> ACL -> IO ()Source

Set the ACL for a file.

setDefaultACL :: FilePath -> ACL -> IO ()Source

Set the default ACL for a directory.

fdSetACL :: Fd -> ACL -> IO ()Source

Set the ACL for a file, given its file descriptor.

deleteDefaultACL :: FilePath -> IO ()Source

Delete the default ACL from a directory.