Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- unionFileModes :: FileMode -> FileMode -> FileMode
- intersectFileModes :: FileMode -> FileMode -> FileMode
- nullFileMode :: FileMode
- ownerReadMode :: FileMode
- ownerWriteMode :: FileMode
- ownerExecuteMode :: FileMode
- ownerModes :: FileMode
- groupReadMode :: FileMode
- groupWriteMode :: FileMode
- groupExecuteMode :: FileMode
- groupModes :: FileMode
- otherReadMode :: FileMode
- otherWriteMode :: FileMode
- otherExecuteMode :: FileMode
- otherModes :: FileMode
- setUserIDMode :: FileMode
- setGroupIDMode :: FileMode
- stdFileMode :: FileMode
- accessModes :: FileMode
- setFileMode :: FilePath -> FileMode -> IO ()
- setFdMode :: Fd -> FileMode -> IO ()
- setFileCreationMask :: FileMode -> IO FileMode
- fileAccess :: FilePath -> Bool -> Bool -> Bool -> IO Bool
- fileExist :: FilePath -> IO Bool
- data FileStatus
- getFileStatus :: FilePath -> IO FileStatus
- getFdStatus :: Fd -> IO FileStatus
- getSymbolicLinkStatus :: FilePath -> IO FileStatus
- deviceID :: FileStatus -> DeviceID
- fileID :: FileStatus -> FileID
- fileMode :: FileStatus -> FileMode
- linkCount :: FileStatus -> LinkCount
- fileOwner :: FileStatus -> UserID
- fileGroup :: FileStatus -> GroupID
- specialDeviceID :: FileStatus -> DeviceID
- fileSize :: FileStatus -> FileOffset
- accessTime :: FileStatus -> EpochTime
- modificationTime :: FileStatus -> EpochTime
- statusChangeTime :: FileStatus -> EpochTime
- accessTimeHiRes :: FileStatus -> POSIXTime
- modificationTimeHiRes :: FileStatus -> POSIXTime
- statusChangeTimeHiRes :: FileStatus -> POSIXTime
- isBlockDevice :: FileStatus -> Bool
- isCharacterDevice :: FileStatus -> Bool
- isNamedPipe :: FileStatus -> Bool
- isRegularFile :: FileStatus -> Bool
- isDirectory :: FileStatus -> Bool
- isSymbolicLink :: FileStatus -> Bool
- isSocket :: FileStatus -> Bool
- createNamedPipe :: FilePath -> FileMode -> IO ()
- createDevice :: FilePath -> FileMode -> DeviceID -> IO ()
- createLink :: FilePath -> FilePath -> IO ()
- removeLink :: FilePath -> IO ()
- createSymbolicLink :: FilePath -> FilePath -> IO ()
- readSymbolicLink :: FilePath -> IO FilePath
- rename :: FilePath -> FilePath -> IO ()
- setOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO ()
- setFdOwnerAndGroup :: Fd -> UserID -> GroupID -> IO ()
- setSymbolicLinkOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO ()
- setFileTimes :: FilePath -> EpochTime -> EpochTime -> IO ()
- touchFile :: FilePath -> IO ()
- setFileSize :: FilePath -> FileOffset -> IO ()
- setFdSize :: Fd -> FileOffset -> IO ()
- data PathVar
- getPathVar :: FilePath -> PathVar -> IO Limit
- getFdPathVar :: Fd -> PathVar -> IO Limit
File modes
unionFileModes :: FileMode -> FileMode -> FileMode #
intersectFileModes :: FileMode -> FileMode -> FileMode #
ownerModes :: FileMode #
groupModes :: FileMode #
otherModes :: FileMode #
stdFileMode :: FileMode #
accessModes :: FileMode #
Setting file modes
setFileMode :: FilePath -> FileMode -> IO () #
setFileCreationMask :: FileMode -> IO FileMode #
Checking file existence and permissions
fileAccess :: FilePath -> Bool -> Bool -> Bool -> IO Bool #
File status
data FileStatus #
Obtaining file status
getFileStatus :: FilePath -> IO FileStatus #
getFdStatus :: Fd -> IO FileStatus #
getSymbolicLinkStatus :: FilePath -> IO FileStatus #
Querying file status
deviceID :: FileStatus -> DeviceID #
fileID :: FileStatus -> FileID #
fileMode :: FileStatus -> FileMode #
linkCount :: FileStatus -> LinkCount #
fileOwner :: FileStatus -> UserID #
fileGroup :: FileStatus -> GroupID #
specialDeviceID :: FileStatus -> DeviceID #
fileSize :: FileStatus -> FileOffset #
accessTime :: FileStatus -> EpochTime #
modificationTime :: FileStatus -> EpochTime #
statusChangeTime :: FileStatus -> EpochTime #
accessTimeHiRes :: FileStatus -> POSIXTime #
modificationTimeHiRes :: FileStatus -> POSIXTime #
statusChangeTimeHiRes :: FileStatus -> POSIXTime #
isBlockDevice :: FileStatus -> Bool #
isCharacterDevice :: FileStatus -> Bool #
isNamedPipe :: FileStatus -> Bool #
isRegularFile :: FileStatus -> Bool #
isDirectory :: FileStatus -> Bool #
isSymbolicLink :: FileStatus -> Bool #
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
Changing file ownership
setOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO () #
setFdOwnerAndGroup :: Fd -> UserID -> GroupID -> IO () #
setSymbolicLinkOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO () #
Changing file timestamps
setFileTimes :: FilePath -> EpochTime -> EpochTime -> IO () #
Setting file sizes
setFileSize :: FilePath -> FileOffset -> IO () #
setFdSize :: Fd -> FileOffset -> IO () #
Find system-specific limits for a file
getPathVar :: FilePath -> PathVar -> IO Limit #
getFdPathVar :: Fd -> PathVar -> IO Limit #