unix-compat-0.7.2: Portable POSIX-compatibility layer.
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.PosixCompat.Files

Description

This module makes the operations exported by System.Posix.Files available on all platforms. On POSIX systems it re-exports operations from System.Posix.Files. On other platforms it emulates the operations as far as possible.

/NOTE: the portable implementations are not well tested, in some cases functions are only stubs./

Synopsis

File modes

Setting file modes

setFileMode :: FilePath -> FileMode -> IO () #

setFdMode :: Fd -> FileMode -> IO () #

Checking file existence and permissions

fileAccess :: FilePath -> Bool -> Bool -> Bool -> IO Bool #

fileExist :: FilePath -> IO Bool #

File status

Obtaining file status

getFileStatus :: FilePath -> IO FileStatus #

Querying file status

accessTimeHiRes :: FileStatus -> POSIXTime #

isSocket :: FileStatus -> Bool #

Creation

createNamedPipe :: FilePath -> FileMode -> IO () #

createDevice :: FilePath -> FileMode -> DeviceID -> IO () #

Hard links

createLink :: FilePath -> FilePath -> IO () #

removeLink :: FilePath -> IO () #

Symbolic links

createSymbolicLink :: FilePath -> FilePath -> IO () #

readSymbolicLink :: FilePath -> IO FilePath #

Renaming files

rename :: FilePath -> FilePath -> IO () #

Changing file ownership

setOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO () #

setSymbolicLinkOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO () #

Changing file timestamps

setFileTimes :: FilePath -> EpochTime -> EpochTime -> IO () #

touchFile :: FilePath -> IO () #

Setting file sizes

setFileSize :: FilePath -> FileOffset -> IO () #

setFdSize :: Fd -> FileOffset -> IO () #

Find system-specific limits for a file

getPathVar :: FilePath -> PathVar -> IO Limit #