{-# LINE 1 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NumDecimals #-}
module System.Posix.Files.Common (
unionFileModes, intersectFileModes,
nullFileMode,
ownerReadMode, ownerWriteMode, ownerExecuteMode, ownerModes,
groupReadMode, groupWriteMode, groupExecuteMode, groupModes,
otherReadMode, otherWriteMode, otherExecuteMode, otherModes,
setUserIDMode, setGroupIDMode,
stdFileMode, accessModes,
fileTypeModes,
blockSpecialMode, characterSpecialMode, namedPipeMode, regularFileMode,
directoryMode, symbolicLinkMode, socketMode,
setFdMode, setFileCreationMask,
FileStatus(..),
getFdStatus,
deviceID, fileID, fileMode, linkCount, fileOwner, fileGroup,
specialDeviceID, fileSize, accessTime, modificationTime,
statusChangeTime,
accessTimeHiRes, modificationTimeHiRes, statusChangeTimeHiRes,
setFdTimesHiRes, touchFd,
isBlockDevice, isCharacterDevice, isNamedPipe, isRegularFile,
isDirectory, isSymbolicLink, isSocket,
fileBlockSize,
fileBlocks,
StatxFlags(..),
pattern EmptyPath,
pattern NoAutoMount,
pattern SymlinkNoFollow,
pattern SyncAsStat,
pattern ForceSync,
pattern DontSync,
defaultStatxFlags,
StatxMask(..),
pattern StatxType,
pattern StatxMode,
pattern StatxNlink,
pattern StatxUid,
pattern StatxGid,
pattern StatxAtime,
pattern StatxMtime,
pattern StatxCtime,
pattern StatxBtime,
pattern StatxIno,
pattern StatxSize,
pattern StatxBlocks,
pattern StatxMntId,
pattern StatxBasicStats,
pattern StatxAll,
defaultStatxMask,
ExtendedFileStatus(..),
CAttributes(..),
getExtendedFileStatus_,
fileBlockSizeX,
linkCountX,
fileOwnerX,
fileGroupX,
fileModeX,
fileIDX,
fileSizeX,
fileBlocksX,
accessTimeHiResX,
creationTimeHiResX,
statusChangeTimeHiResX,
modificationTimeHiResX,
deviceIDX,
specialDeviceIDX,
mountIDX,
fileCompressedX,
fileImmutableX,
fileAppendX,
fileNoDumpX,
fileEncryptedX,
fileVerityX,
fileDaxX,
isBlockDeviceX,
isCharacterDeviceX,
isNamedPipeX,
isRegularFileX,
isDirectoryX,
isSymbolicLinkX,
isSocketX,
setFdSize,
setFdOwnerAndGroup,
PathVar(..), getFdPathVar, pathVarConst,
{-# LINE 137 "libraries/unix/System/Posix/Files/Common.hsc" #-}
CTimeSpec(..),
toCTimeSpec,
c_utimensat,
{-# LINE 141 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 146 "libraries/unix/System/Posix/Files/Common.hsc" #-}
CTimeVal(..),
toCTimeVal,
c_utimes,
{-# LINE 150 "libraries/unix/System/Posix/Files/Common.hsc" #-}
c_lutimes,
{-# LINE 152 "libraries/unix/System/Posix/Files/Common.hsc" #-}
) where
import System.Posix.Types
import System.IO.Unsafe
import Data.Bits
import Data.Int
import Data.Ratio
import Data.Word
{-# LINE 164 "libraries/unix/System/Posix/Files/Common.hsc" #-}
import Data.Time.Clock.POSIX (POSIXTime)
import System.Posix.Internals
import Foreign.C
import Foreign.ForeignPtr
{-# LINE 169 "libraries/unix/System/Posix/Files/Common.hsc" #-}
import Foreign.Marshal (withArray)
{-# LINE 171 "libraries/unix/System/Posix/Files/Common.hsc" #-}
import Foreign.Ptr
import Foreign.Storable
{-# LINE 175 "libraries/unix/System/Posix/Files/Common.hsc" #-}
import System.IO.Error ( ioeSetLocation )
import GHC.IO.Exception ( unsupportedOperation )
{-# LINE 178 "libraries/unix/System/Posix/Files/Common.hsc" #-}
nullFileMode :: FileMode
nullFileMode :: FileMode
nullFileMode = FileMode
0
ownerReadMode :: FileMode
ownerReadMode :: FileMode
ownerReadMode = (FileMode
256)
{-# LINE 192 "libraries/unix/System/Posix/Files/Common.hsc" #-}
ownerWriteMode :: FileMode
ownerWriteMode :: FileMode
ownerWriteMode = (FileMode
128)
{-# LINE 196 "libraries/unix/System/Posix/Files/Common.hsc" #-}
ownerExecuteMode :: FileMode
ownerExecuteMode :: FileMode
ownerExecuteMode = (FileMode
64)
{-# LINE 200 "libraries/unix/System/Posix/Files/Common.hsc" #-}
groupReadMode :: FileMode
groupReadMode :: FileMode
groupReadMode = (FileMode
32)
{-# LINE 204 "libraries/unix/System/Posix/Files/Common.hsc" #-}
groupWriteMode :: FileMode
groupWriteMode :: FileMode
groupWriteMode = (FileMode
16)
{-# LINE 208 "libraries/unix/System/Posix/Files/Common.hsc" #-}
groupExecuteMode :: FileMode
groupExecuteMode :: FileMode
groupExecuteMode = (FileMode
8)
{-# LINE 212 "libraries/unix/System/Posix/Files/Common.hsc" #-}
otherReadMode :: FileMode
otherReadMode :: FileMode
otherReadMode = (FileMode
4)
{-# LINE 216 "libraries/unix/System/Posix/Files/Common.hsc" #-}
otherWriteMode :: FileMode
otherWriteMode :: FileMode
otherWriteMode = (FileMode
2)
{-# LINE 220 "libraries/unix/System/Posix/Files/Common.hsc" #-}
otherExecuteMode :: FileMode
otherExecuteMode :: FileMode
otherExecuteMode = (FileMode
1)
{-# LINE 224 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setUserIDMode :: FileMode
setUserIDMode :: FileMode
setUserIDMode = (FileMode
2048)
{-# LINE 228 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setGroupIDMode :: FileMode
setGroupIDMode :: FileMode
setGroupIDMode = (FileMode
1024)
{-# LINE 232 "libraries/unix/System/Posix/Files/Common.hsc" #-}
stdFileMode :: FileMode
stdFileMode :: FileMode
stdFileMode = FileMode
ownerReadMode FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
ownerWriteMode FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|.
FileMode
groupReadMode FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
groupWriteMode FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|.
FileMode
otherReadMode FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
otherWriteMode
ownerModes :: FileMode
ownerModes :: FileMode
ownerModes = (FileMode
448)
{-# LINE 242 "libraries/unix/System/Posix/Files/Common.hsc" #-}
groupModes :: FileMode
groupModes :: FileMode
groupModes = (FileMode
56)
{-# LINE 246 "libraries/unix/System/Posix/Files/Common.hsc" #-}
otherModes :: FileMode
otherModes :: FileMode
otherModes = (FileMode
7)
{-# LINE 250 "libraries/unix/System/Posix/Files/Common.hsc" #-}
accessModes :: FileMode
accessModes :: FileMode
accessModes = FileMode
ownerModes FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
groupModes FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
otherModes
unionFileModes :: FileMode -> FileMode -> FileMode
unionFileModes :: FileMode -> FileMode -> FileMode
unionFileModes FileMode
m1 FileMode
m2 = FileMode
m1 FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.|. FileMode
m2
intersectFileModes :: FileMode -> FileMode -> FileMode
intersectFileModes :: FileMode -> FileMode -> FileMode
intersectFileModes FileMode
m1 FileMode
m2 = FileMode
m1 FileMode -> FileMode -> FileMode
forall a. Bits a => a -> a -> a
.&. FileMode
m2
fileTypeModes :: FileMode
fileTypeModes :: FileMode
fileTypeModes = (FileMode
61440)
{-# LINE 267 "libraries/unix/System/Posix/Files/Common.hsc" #-}
blockSpecialMode :: FileMode
blockSpecialMode :: FileMode
blockSpecialMode = (FileMode
24576)
{-# LINE 270 "libraries/unix/System/Posix/Files/Common.hsc" #-}
characterSpecialMode :: FileMode
characterSpecialMode :: FileMode
characterSpecialMode = (FileMode
8192)
{-# LINE 273 "libraries/unix/System/Posix/Files/Common.hsc" #-}
namedPipeMode :: FileMode
namedPipeMode :: FileMode
namedPipeMode = (FileMode
4096)
{-# LINE 276 "libraries/unix/System/Posix/Files/Common.hsc" #-}
regularFileMode :: FileMode
regularFileMode :: FileMode
regularFileMode = (FileMode
32768)
{-# LINE 279 "libraries/unix/System/Posix/Files/Common.hsc" #-}
directoryMode :: FileMode
directoryMode :: FileMode
directoryMode = (FileMode
16384)
{-# LINE 282 "libraries/unix/System/Posix/Files/Common.hsc" #-}
symbolicLinkMode :: FileMode
symbolicLinkMode :: FileMode
symbolicLinkMode = (FileMode
40960)
{-# LINE 285 "libraries/unix/System/Posix/Files/Common.hsc" #-}
socketMode :: FileMode
socketMode :: FileMode
socketMode = (FileMode
49152)
{-# LINE 288 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 290 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFdMode :: Fd -> FileMode -> IO ()
setFdMode :: Fd -> FileMode -> IO ()
setFdMode (Fd CInt
fd) FileMode
m =
String -> IO CInt -> IO ()
forall a. (Eq a, Num a) => String -> IO a -> IO ()
throwErrnoIfMinus1_ String
"setFdMode" (CInt -> FileMode -> IO CInt
c_fchmod CInt
fd FileMode
m)
foreign import ccall unsafe "fchmod"
c_fchmod :: CInt -> CMode -> IO CInt
{-# LINE 309 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFileCreationMask :: FileMode -> IO FileMode
setFileCreationMask :: FileMode -> IO FileMode
setFileCreationMask FileMode
mask = FileMode -> IO FileMode
c_umask FileMode
mask
newtype FileStatus = FileStatus (ForeignPtr CStat)
deviceID :: FileStatus -> DeviceID
fileID :: FileStatus -> FileID
fileMode :: FileStatus -> FileMode
linkCount :: FileStatus -> LinkCount
fileOwner :: FileStatus -> UserID
fileGroup :: FileStatus -> GroupID
specialDeviceID :: FileStatus -> DeviceID
fileSize :: FileStatus -> FileOffset
fileBlocks :: FileStatus -> Maybe CBlkCnt
fileBlockSize :: FileStatus -> Maybe CBlkSize
accessTime :: FileStatus -> EpochTime
accessTimeHiRes :: FileStatus -> POSIXTime
modificationTime :: FileStatus -> EpochTime
modificationTimeHiRes :: FileStatus -> POSIXTime
statusChangeTime :: FileStatus -> EpochTime
statusChangeTimeHiRes :: FileStatus -> POSIXTime
deviceID :: FileStatus -> DeviceID
deviceID (FileStatus ForeignPtr CStat
stat) =
IO DeviceID -> DeviceID
forall a. IO a -> a
unsafePerformIO (IO DeviceID -> DeviceID) -> IO DeviceID -> DeviceID
forall a b. (a -> b) -> a -> b
$ ForeignPtr CStat -> (Ptr CStat -> IO DeviceID) -> IO DeviceID
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CStat
stat ((Ptr CStat -> IO DeviceID) -> IO DeviceID)
-> (Ptr CStat -> IO DeviceID) -> IO DeviceID
forall a b. (a -> b) -> a -> b
$ ((\Ptr CStat
hsc_ptr -> Ptr CStat -> Int -> IO DeviceID
forall b. Ptr b -> Int -> IO DeviceID
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr CStat
hsc_ptr Int
0))
{-# LINE 376 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileID (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 8))
fileMode :: FileStatus -> FileMode
{-# LINE 378 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileMode (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 24))
{-# LINE 380 "libraries/unix/System/Posix/Files/Common.hsc" #-}
linkCount (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 16))
{-# LINE 382 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileOwner (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 28))
{-# LINE 384 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileGroup (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 32))
{-# LINE 386 "libraries/unix/System/Posix/Files/Common.hsc" #-}
specialDeviceID (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 40))
fileSize :: FileStatus -> FileOffset
{-# LINE 388 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileSize (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 48))
{-# LINE 390 "libraries/unix/System/Posix/Files/Common.hsc" #-}
accessTime (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 72))
{-# LINE 392 "libraries/unix/System/Posix/Files/Common.hsc" #-}
modificationTime (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 88))
{-# LINE 394 "libraries/unix/System/Posix/Files/Common.hsc" #-}
statusChangeTime (FileStatus stat) =
unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 104))
{-# LINE 396 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 398 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileBlocks (FileStatus stat) =
Just $ unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 64))
{-# LINE 400 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 403 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 404 "libraries/unix/System/Posix/Files/Common.hsc" #-}
fileBlockSize (FileStatus stat) =
Just $ unsafePerformIO $ withForeignPtr stat $ ((\hsc_ptr -> peekByteOff hsc_ptr 56))
{-# LINE 406 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 409 "libraries/unix/System/Posix/Files/Common.hsc" #-}
accessTimeHiRes :: FileStatus -> POSIXTime
accessTimeHiRes (FileStatus ForeignPtr CStat
stat) =
IO POSIXTime -> POSIXTime
forall a. IO a -> a
unsafePerformIO (IO POSIXTime -> POSIXTime) -> IO POSIXTime -> POSIXTime
forall a b. (a -> b) -> a -> b
$ ForeignPtr CStat -> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CStat
stat ((Ptr CStat -> IO POSIXTime) -> IO POSIXTime)
-> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ \Ptr CStat
stat_ptr -> do
EpochTime
sec <- ((\Ptr CStat
hsc_ptr -> Ptr CStat -> Int -> IO EpochTime
forall b. Ptr b -> Int -> IO EpochTime
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr CStat
hsc_ptr Int
72)) Ptr CStat
stat_ptr :: IO EpochTime
{-# LINE 413 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 414 "libraries/unix/System/Posix/Files/Common.hsc" #-}
nsec <- ((\hsc_ptr -> peekByteOff hsc_ptr 80)) stat_ptr :: IO (Int64)
{-# LINE 415 "libraries/unix/System/Posix/Files/Common.hsc" #-}
let frac = toInteger nsec % 10^(9::Int)
{-# LINE 431 "libraries/unix/System/Posix/Files/Common.hsc" #-}
POSIXTime -> IO POSIXTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (POSIXTime -> IO POSIXTime) -> POSIXTime -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ Rational -> POSIXTime
forall a. Fractional a => Rational -> a
fromRational (Rational -> POSIXTime) -> Rational -> POSIXTime
forall a b. (a -> b) -> a -> b
$ EpochTime -> Rational
forall a. Real a => a -> Rational
toRational EpochTime
sec Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ Rational
frac
modificationTimeHiRes :: FileStatus -> POSIXTime
modificationTimeHiRes (FileStatus ForeignPtr CStat
stat) =
IO POSIXTime -> POSIXTime
forall a. IO a -> a
unsafePerformIO (IO POSIXTime -> POSIXTime) -> IO POSIXTime -> POSIXTime
forall a b. (a -> b) -> a -> b
$ ForeignPtr CStat -> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CStat
stat ((Ptr CStat -> IO POSIXTime) -> IO POSIXTime)
-> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ \Ptr CStat
stat_ptr -> do
EpochTime
sec <- ((\Ptr CStat
hsc_ptr -> Ptr CStat -> Int -> IO EpochTime
forall b. Ptr b -> Int -> IO EpochTime
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr CStat
hsc_ptr Int
88)) Ptr CStat
stat_ptr :: IO EpochTime
{-# LINE 436 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 437 "libraries/unix/System/Posix/Files/Common.hsc" #-}
nsec <- ((\hsc_ptr -> peekByteOff hsc_ptr 96)) stat_ptr :: IO (Int64)
{-# LINE 438 "libraries/unix/System/Posix/Files/Common.hsc" #-}
let frac = toInteger nsec % 10^(9::Int)
{-# LINE 454 "libraries/unix/System/Posix/Files/Common.hsc" #-}
POSIXTime -> IO POSIXTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (POSIXTime -> IO POSIXTime) -> POSIXTime -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ Rational -> POSIXTime
forall a. Fractional a => Rational -> a
fromRational (Rational -> POSIXTime) -> Rational -> POSIXTime
forall a b. (a -> b) -> a -> b
$ EpochTime -> Rational
forall a. Real a => a -> Rational
toRational EpochTime
sec Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ Rational
frac
statusChangeTimeHiRes :: FileStatus -> POSIXTime
statusChangeTimeHiRes (FileStatus ForeignPtr CStat
stat) =
IO POSIXTime -> POSIXTime
forall a. IO a -> a
unsafePerformIO (IO POSIXTime -> POSIXTime) -> IO POSIXTime -> POSIXTime
forall a b. (a -> b) -> a -> b
$ ForeignPtr CStat -> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr CStat
stat ((Ptr CStat -> IO POSIXTime) -> IO POSIXTime)
-> (Ptr CStat -> IO POSIXTime) -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ \Ptr CStat
stat_ptr -> do
EpochTime
sec <- ((\Ptr CStat
hsc_ptr -> Ptr CStat -> Int -> IO EpochTime
forall b. Ptr b -> Int -> IO EpochTime
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr CStat
hsc_ptr Int
104)) Ptr CStat
stat_ptr :: IO EpochTime
{-# LINE 459 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 460 "libraries/unix/System/Posix/Files/Common.hsc" #-}
nsec <- ((\hsc_ptr -> peekByteOff hsc_ptr 112)) stat_ptr :: IO (Int64)
{-# LINE 461 "libraries/unix/System/Posix/Files/Common.hsc" #-}
let frac = toInteger nsec % 10^(9::Int)
{-# LINE 477 "libraries/unix/System/Posix/Files/Common.hsc" #-}
POSIXTime -> IO POSIXTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (POSIXTime -> IO POSIXTime) -> POSIXTime -> IO POSIXTime
forall a b. (a -> b) -> a -> b
$ Rational -> POSIXTime
forall a. Fractional a => Rational -> a
fromRational (Rational -> POSIXTime) -> Rational -> POSIXTime
forall a b. (a -> b) -> a -> b
$ EpochTime -> Rational
forall a. Real a => a -> Rational
toRational EpochTime
sec Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ Rational
frac
isBlockDevice :: FileStatus -> Bool
isCharacterDevice :: FileStatus -> Bool
isNamedPipe :: FileStatus -> Bool
isRegularFile :: FileStatus -> Bool
isDirectory :: FileStatus -> Bool
isSymbolicLink :: FileStatus -> Bool
isSocket :: FileStatus -> Bool
isBlockDevice :: FileStatus -> Bool
isBlockDevice FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
blockSpecialMode
isCharacterDevice :: FileStatus -> Bool
isCharacterDevice FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
characterSpecialMode
isNamedPipe :: FileStatus -> Bool
isNamedPipe FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
namedPipeMode
isRegularFile :: FileStatus -> Bool
isRegularFile FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
regularFileMode
isDirectory :: FileStatus -> Bool
isDirectory FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
directoryMode
isSymbolicLink :: FileStatus -> Bool
isSymbolicLink FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
symbolicLinkMode
isSocket :: FileStatus -> Bool
isSocket FileStatus
stat =
(FileStatus -> FileMode
fileMode FileStatus
stat FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
socketMode
getFdStatus :: Fd -> IO FileStatus
getFdStatus :: Fd -> IO FileStatus
getFdStatus (Fd CInt
fd) = do
ForeignPtr CStat
fp <- Int -> IO (ForeignPtr CStat)
forall a. Int -> IO (ForeignPtr a)
mallocForeignPtrBytes (Int
144)
{-# LINE 515 "libraries/unix/System/Posix/Files/Common.hsc" #-}
withForeignPtr fp $ \p ->
throwErrnoIfMinus1_ "getFdStatus" (c_fstat fd p)
FileStatus -> IO FileStatus
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (ForeignPtr CStat -> FileStatus
FileStatus ForeignPtr CStat
fp)
{-# LINE 523 "libraries/unix/System/Posix/Files/Common.hsc" #-}
data CTimeSpec = CTimeSpec EpochTime CLong
instance Storable CTimeSpec where
sizeOf :: CTimeSpec -> Int
sizeOf CTimeSpec
_ = (Int
16)
{-# LINE 527 "libraries/unix/System/Posix/Files/Common.hsc" #-}
alignment _ = alignment (undefined :: CInt)
poke :: Ptr CTimeSpec -> CTimeSpec -> IO ()
poke Ptr CTimeSpec
p (CTimeSpec EpochTime
sec CLong
nsec) = do
((\Ptr CTimeSpec
hsc_ptr -> Ptr CTimeSpec -> Int -> EpochTime -> IO ()
forall b. Ptr b -> Int -> EpochTime -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr CTimeSpec
hsc_ptr Int
0)) Ptr CTimeSpec
p EpochTime
sec
{-# LINE 530 "libraries/unix/System/Posix/Files/Common.hsc" #-}
((\Ptr CTimeSpec
hsc_ptr -> Ptr CTimeSpec -> Int -> CLong -> IO ()
forall b. Ptr b -> Int -> CLong -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr CTimeSpec
hsc_ptr Int
8)) Ptr CTimeSpec
p CLong
nsec
{-# LINE 531 "libraries/unix/System/Posix/Files/Common.hsc" #-}
peek p = do
sec <- (\hsc_ptr -> peekByteOff hsc_ptr 0) p
{-# LINE 533 "libraries/unix/System/Posix/Files/Common.hsc" #-}
nsec <- (\hsc_ptr -> peekByteOff hsc_ptr 8) p
{-# LINE 534 "libraries/unix/System/Posix/Files/Common.hsc" #-}
return $ CTimeSpec sec nsec
toCTimeSpec :: POSIXTime -> CTimeSpec
toCTimeSpec :: POSIXTime -> CTimeSpec
toCTimeSpec POSIXTime
t = EpochTime -> CLong -> CTimeSpec
CTimeSpec (Int64 -> EpochTime
CTime Int64
sec) (Rational -> CLong
forall b. Integral b => Rational -> b
forall a b. (RealFrac a, Integral b) => a -> b
truncate (Rational -> CLong) -> Rational -> CLong
forall a b. (a -> b) -> a -> b
$ Rational
10Rational -> Int -> Rational
forall a b. (Num a, Integral b) => a -> b -> a
^(Int
9::Int) Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
* Rational
frac)
where
(Int64
sec, Rational
frac) = if (Rational
frac' Rational -> Rational -> Bool
forall a. Ord a => a -> a -> Bool
< Rational
0) then (Int64
sec' Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
- Int64
1, Rational
frac' Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ Rational
1) else (Int64
sec', Rational
frac')
(Int64
sec', Rational
frac') = Rational -> (Int64, Rational)
forall b. Integral b => Rational -> (b, Rational)
forall a b. (RealFrac a, Integral b) => a -> (b, a)
properFraction (Rational -> (Int64, Rational)) -> Rational -> (Int64, Rational)
forall a b. (a -> b) -> a -> b
$ POSIXTime -> Rational
forall a. Real a => a -> Rational
toRational POSIXTime
t
{-# LINE 542 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 544 "libraries/unix/System/Posix/Files/Common.hsc" #-}
foreign import capi unsafe "sys/stat.h utimensat"
c_utimensat :: CInt -> CString -> Ptr CTimeSpec -> CInt -> IO CInt
{-# LINE 547 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 549 "libraries/unix/System/Posix/Files/Common.hsc" #-}
foreign import capi unsafe "sys/stat.h futimens"
c_futimens :: CInt -> Ptr CTimeSpec -> IO CInt
{-# LINE 552 "libraries/unix/System/Posix/Files/Common.hsc" #-}
data CTimeVal = CTimeVal CLong CLong
instance Storable CTimeVal where
sizeOf :: CTimeVal -> Int
sizeOf CTimeVal
_ = (Int
16)
{-# LINE 557 "libraries/unix/System/Posix/Files/Common.hsc" #-}
alignment _ = alignment (undefined :: CInt)
poke :: Ptr CTimeVal -> CTimeVal -> IO ()
poke Ptr CTimeVal
p (CTimeVal CLong
sec CLong
usec) = do
((\Ptr CTimeVal
hsc_ptr -> Ptr CTimeVal -> Int -> CLong -> IO ()
forall b. Ptr b -> Int -> CLong -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr CTimeVal
hsc_ptr Int
0)) Ptr CTimeVal
p CLong
sec
{-# LINE 560 "libraries/unix/System/Posix/Files/Common.hsc" #-}
((\Ptr CTimeVal
hsc_ptr -> Ptr CTimeVal -> Int -> CLong -> IO ()
forall b. Ptr b -> Int -> CLong -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr CTimeVal
hsc_ptr Int
8)) Ptr CTimeVal
p CLong
usec
{-# LINE 561 "libraries/unix/System/Posix/Files/Common.hsc" #-}
peek p = do
sec <- (\hsc_ptr -> peekByteOff hsc_ptr 0) p
{-# LINE 563 "libraries/unix/System/Posix/Files/Common.hsc" #-}
usec <- (\hsc_ptr -> peekByteOff hsc_ptr 8) p
{-# LINE 564 "libraries/unix/System/Posix/Files/Common.hsc" #-}
return $ CTimeVal sec usec
toCTimeVal :: POSIXTime -> CTimeVal
toCTimeVal :: POSIXTime -> CTimeVal
toCTimeVal POSIXTime
t = CLong -> CLong -> CTimeVal
CTimeVal CLong
sec (Rational -> CLong
forall b. Integral b => Rational -> b
forall a b. (RealFrac a, Integral b) => a -> b
truncate (Rational -> CLong) -> Rational -> CLong
forall a b. (a -> b) -> a -> b
$ Rational
10Rational -> Int -> Rational
forall a b. (Num a, Integral b) => a -> b -> a
^(Int
6::Int) Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
* Rational
frac)
where
(CLong
sec, Rational
frac) = if (Rational
frac' Rational -> Rational -> Bool
forall a. Ord a => a -> a -> Bool
< Rational
0) then (CLong
sec' CLong -> CLong -> CLong
forall a. Num a => a -> a -> a
- CLong
1, Rational
frac' Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ Rational
1) else (CLong
sec', Rational
frac')
(CLong
sec', Rational
frac') = Rational -> (CLong, Rational)
forall b. Integral b => Rational -> (b, Rational)
forall a b. (RealFrac a, Integral b) => a -> (b, a)
properFraction (Rational -> (CLong, Rational)) -> Rational -> (CLong, Rational)
forall a b. (a -> b) -> a -> b
$ POSIXTime -> Rational
forall a. Real a => a -> Rational
toRational POSIXTime
t
foreign import capi unsafe "sys/time.h utimes"
c_utimes :: CString -> Ptr CTimeVal -> IO CInt
{-# LINE 576 "libraries/unix/System/Posix/Files/Common.hsc" #-}
foreign import capi unsafe "sys/time.h lutimes"
c_lutimes :: CString -> Ptr CTimeVal -> IO CInt
{-# LINE 579 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 581 "libraries/unix/System/Posix/Files/Common.hsc" #-}
foreign import capi unsafe "sys/time.h futimes"
c_futimes :: CInt -> Ptr CTimeVal -> IO CInt
{-# LINE 584 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 593 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFdTimesHiRes :: Fd -> POSIXTime -> POSIXTime -> IO ()
{-# LINE 610 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFdTimesHiRes :: Fd -> POSIXTime -> POSIXTime -> IO ()
setFdTimesHiRes (Fd CInt
fd) POSIXTime
atime POSIXTime
mtime =
[CTimeSpec] -> (Ptr CTimeSpec -> IO ()) -> IO ()
forall a b. Storable a => [a] -> (Ptr a -> IO b) -> IO b
withArray [POSIXTime -> CTimeSpec
toCTimeSpec POSIXTime
atime, POSIXTime -> CTimeSpec
toCTimeSpec POSIXTime
mtime] ((Ptr CTimeSpec -> IO ()) -> IO ())
-> (Ptr CTimeSpec -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CTimeSpec
times ->
String -> IO CInt -> IO ()
forall a. (Eq a, Num a) => String -> IO a -> IO ()
throwErrnoIfMinus1_ String
"setFdTimesHiRes" (CInt -> Ptr CTimeSpec -> IO CInt
c_futimens CInt
fd Ptr CTimeSpec
times)
{-# LINE 622 "libraries/unix/System/Posix/Files/Common.hsc" #-}
touchFd :: Fd -> IO ()
{-# LINE 636 "libraries/unix/System/Posix/Files/Common.hsc" #-}
touchFd :: Fd -> IO ()
touchFd (Fd CInt
fd) =
String -> IO CInt -> IO ()
forall a. (Eq a, Num a) => String -> IO a -> IO ()
throwErrnoIfMinus1_ String
"touchFd" (CInt -> Ptr CTimeVal -> IO CInt
c_futimes CInt
fd Ptr CTimeVal
forall a. Ptr a
nullPtr)
{-# LINE 643 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 648 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFdOwnerAndGroup :: Fd -> UserID -> GroupID -> IO ()
setFdOwnerAndGroup :: Fd -> UserID -> GroupID -> IO ()
setFdOwnerAndGroup (Fd CInt
fd) UserID
uid GroupID
gid =
String -> IO CInt -> IO ()
forall a. (Eq a, Num a) => String -> IO a -> IO ()
throwErrnoIfMinus1_ String
"setFdOwnerAndGroup" (CInt -> UserID -> GroupID -> IO CInt
c_fchown CInt
fd UserID
uid GroupID
gid)
foreign import ccall unsafe "fchown"
c_fchown :: CInt -> CUid -> CGid -> IO CInt
{-# LINE 667 "libraries/unix/System/Posix/Files/Common.hsc" #-}
setFdSize :: Fd -> FileOffset -> IO ()
setFdSize :: Fd -> FileOffset -> IO ()
setFdSize (Fd CInt
fd) FileOffset
off =
String -> IO CInt -> IO ()
forall a. (Eq a, Num a) => String -> IO a -> IO ()
throwErrnoIfMinus1_ String
"setFdSize" (CInt -> FileOffset -> IO CInt
c_ftruncate CInt
fd FileOffset
off)
data PathVar
= FileSizeBits
| LinkLimit
| InputLineLimit
| InputQueueLimit
| FileNameLimit
| PathNameLimit
| PipeBufferLimit
| SymbolicLinkLimit
| SetOwnerAndGroupIsRestricted
| FileNamesAreNotTruncated
| VDisableChar
| AsyncIOAvailable
| PrioIOAvailable
| SyncIOAvailable
pathVarConst :: PathVar -> CInt
pathVarConst :: PathVar -> CInt
pathVarConst PathVar
v = case PathVar
v of
PathVar
LinkLimit -> (CInt
0)
{-# LINE 706 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
InputLineLimit -> (CInt
1)
{-# LINE 707 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
InputQueueLimit -> (CInt
2)
{-# LINE 708 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
FileNameLimit -> (CInt
3)
{-# LINE 709 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
PathNameLimit -> (CInt
4)
{-# LINE 710 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
PipeBufferLimit -> (CInt
5)
{-# LINE 711 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
SetOwnerAndGroupIsRestricted -> (CInt
6)
{-# LINE 712 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
FileNamesAreNotTruncated -> (CInt
7)
{-# LINE 713 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
VDisableChar -> (CInt
8)
{-# LINE 714 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 716 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
SyncIOAvailable -> (CInt
9)
{-# LINE 717 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 720 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 722 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
AsyncIOAvailable -> (CInt
10)
{-# LINE 723 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 726 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 728 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
PrioIOAvailable -> (CInt
11)
{-# LINE 729 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 732 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 734 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
FileSizeBits -> (CInt
13)
{-# LINE 735 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 738 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 740 "libraries/unix/System/Posix/Files/Common.hsc" #-}
PathVar
SymbolicLinkLimit -> (CInt
19)
{-# LINE 741 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 744 "libraries/unix/System/Posix/Files/Common.hsc" #-}
getFdPathVar :: Fd -> PathVar -> IO Limit
getFdPathVar :: Fd -> PathVar -> IO CLong
getFdPathVar (Fd CInt
fd) PathVar
v =
String -> IO CLong -> IO CLong
forall a. (Eq a, Num a) => String -> IO a -> IO a
throwErrnoIfMinus1 String
"getFdPathVar" (IO CLong -> IO CLong) -> IO CLong -> IO CLong
forall a b. (a -> b) -> a -> b
$
CInt -> CInt -> IO CLong
c_fpathconf CInt
fd (PathVar -> CInt
pathVarConst PathVar
v)
foreign import ccall unsafe "fpathconf"
c_fpathconf :: CInt -> CInt -> IO CLong
newtype {-# CTYPE "__u64" #-} CAttributes = CAttributes Word64
deriving (ReadPrec [CAttributes]
ReadPrec CAttributes
Int -> ReadS CAttributes
ReadS [CAttributes]
(Int -> ReadS CAttributes)
-> ReadS [CAttributes]
-> ReadPrec CAttributes
-> ReadPrec [CAttributes]
-> Read CAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS CAttributes
readsPrec :: Int -> ReadS CAttributes
$creadList :: ReadS [CAttributes]
readList :: ReadS [CAttributes]
$creadPrec :: ReadPrec CAttributes
readPrec :: ReadPrec CAttributes
$creadListPrec :: ReadPrec [CAttributes]
readListPrec :: ReadPrec [CAttributes]
Read, Int -> CAttributes -> ShowS
[CAttributes] -> ShowS
CAttributes -> String
(Int -> CAttributes -> ShowS)
-> (CAttributes -> String)
-> ([CAttributes] -> ShowS)
-> Show CAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CAttributes -> ShowS
showsPrec :: Int -> CAttributes -> ShowS
$cshow :: CAttributes -> String
show :: CAttributes -> String
$cshowList :: [CAttributes] -> ShowS
showList :: [CAttributes] -> ShowS
Show, CAttributes -> CAttributes -> Bool
(CAttributes -> CAttributes -> Bool)
-> (CAttributes -> CAttributes -> Bool) -> Eq CAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CAttributes -> CAttributes -> Bool
== :: CAttributes -> CAttributes -> Bool
$c/= :: CAttributes -> CAttributes -> Bool
/= :: CAttributes -> CAttributes -> Bool
Eq, Eq CAttributes
Eq CAttributes =>
(CAttributes -> CAttributes -> Ordering)
-> (CAttributes -> CAttributes -> Bool)
-> (CAttributes -> CAttributes -> Bool)
-> (CAttributes -> CAttributes -> Bool)
-> (CAttributes -> CAttributes -> Bool)
-> (CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes -> CAttributes)
-> Ord CAttributes
CAttributes -> CAttributes -> Bool
CAttributes -> CAttributes -> Ordering
CAttributes -> CAttributes -> CAttributes
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: CAttributes -> CAttributes -> Ordering
compare :: CAttributes -> CAttributes -> Ordering
$c< :: CAttributes -> CAttributes -> Bool
< :: CAttributes -> CAttributes -> Bool
$c<= :: CAttributes -> CAttributes -> Bool
<= :: CAttributes -> CAttributes -> Bool
$c> :: CAttributes -> CAttributes -> Bool
> :: CAttributes -> CAttributes -> Bool
$c>= :: CAttributes -> CAttributes -> Bool
>= :: CAttributes -> CAttributes -> Bool
$cmax :: CAttributes -> CAttributes -> CAttributes
max :: CAttributes -> CAttributes -> CAttributes
$cmin :: CAttributes -> CAttributes -> CAttributes
min :: CAttributes -> CAttributes -> CAttributes
Ord, Ptr CAttributes -> IO CAttributes
Ptr CAttributes -> Int -> IO CAttributes
Ptr CAttributes -> Int -> CAttributes -> IO ()
Ptr CAttributes -> CAttributes -> IO ()
CAttributes -> Int
(CAttributes -> Int)
-> (CAttributes -> Int)
-> (Ptr CAttributes -> Int -> IO CAttributes)
-> (Ptr CAttributes -> Int -> CAttributes -> IO ())
-> (forall b. Ptr b -> Int -> IO CAttributes)
-> (forall b. Ptr b -> Int -> CAttributes -> IO ())
-> (Ptr CAttributes -> IO CAttributes)
-> (Ptr CAttributes -> CAttributes -> IO ())
-> Storable CAttributes
forall b. Ptr b -> Int -> IO CAttributes
forall b. Ptr b -> Int -> CAttributes -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
$csizeOf :: CAttributes -> Int
sizeOf :: CAttributes -> Int
$calignment :: CAttributes -> Int
alignment :: CAttributes -> Int
$cpeekElemOff :: Ptr CAttributes -> Int -> IO CAttributes
peekElemOff :: Ptr CAttributes -> Int -> IO CAttributes
$cpokeElemOff :: Ptr CAttributes -> Int -> CAttributes -> IO ()
pokeElemOff :: Ptr CAttributes -> Int -> CAttributes -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CAttributes
peekByteOff :: forall b. Ptr b -> Int -> IO CAttributes
$cpokeByteOff :: forall b. Ptr b -> Int -> CAttributes -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> CAttributes -> IO ()
$cpeek :: Ptr CAttributes -> IO CAttributes
peek :: Ptr CAttributes -> IO CAttributes
$cpoke :: Ptr CAttributes -> CAttributes -> IO ()
poke :: Ptr CAttributes -> CAttributes -> IO ()
Storable, Integer -> CAttributes
CAttributes -> CAttributes
CAttributes -> CAttributes -> CAttributes
(CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes)
-> (CAttributes -> CAttributes)
-> (CAttributes -> CAttributes)
-> (Integer -> CAttributes)
-> Num CAttributes
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: CAttributes -> CAttributes -> CAttributes
+ :: CAttributes -> CAttributes -> CAttributes
$c- :: CAttributes -> CAttributes -> CAttributes
- :: CAttributes -> CAttributes -> CAttributes
$c* :: CAttributes -> CAttributes -> CAttributes
* :: CAttributes -> CAttributes -> CAttributes
$cnegate :: CAttributes -> CAttributes
negate :: CAttributes -> CAttributes
$cabs :: CAttributes -> CAttributes
abs :: CAttributes -> CAttributes
$csignum :: CAttributes -> CAttributes
signum :: CAttributes -> CAttributes
$cfromInteger :: Integer -> CAttributes
fromInteger :: Integer -> CAttributes
Num, Eq CAttributes
CAttributes
Eq CAttributes =>
(CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes -> CAttributes)
-> (CAttributes -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> CAttributes
-> (Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> Bool)
-> (CAttributes -> Maybe Int)
-> (CAttributes -> Int)
-> (CAttributes -> Bool)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int -> CAttributes)
-> (CAttributes -> Int)
-> Bits CAttributes
Int -> CAttributes
CAttributes -> Bool
CAttributes -> Int
CAttributes -> Maybe Int
CAttributes -> CAttributes
CAttributes -> Int -> Bool
CAttributes -> Int -> CAttributes
CAttributes -> CAttributes -> CAttributes
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
$c.&. :: CAttributes -> CAttributes -> CAttributes
.&. :: CAttributes -> CAttributes -> CAttributes
$c.|. :: CAttributes -> CAttributes -> CAttributes
.|. :: CAttributes -> CAttributes -> CAttributes
$cxor :: CAttributes -> CAttributes -> CAttributes
xor :: CAttributes -> CAttributes -> CAttributes
$ccomplement :: CAttributes -> CAttributes
complement :: CAttributes -> CAttributes
$cshift :: CAttributes -> Int -> CAttributes
shift :: CAttributes -> Int -> CAttributes
$crotate :: CAttributes -> Int -> CAttributes
rotate :: CAttributes -> Int -> CAttributes
$czeroBits :: CAttributes
zeroBits :: CAttributes
$cbit :: Int -> CAttributes
bit :: Int -> CAttributes
$csetBit :: CAttributes -> Int -> CAttributes
setBit :: CAttributes -> Int -> CAttributes
$cclearBit :: CAttributes -> Int -> CAttributes
clearBit :: CAttributes -> Int -> CAttributes
$ccomplementBit :: CAttributes -> Int -> CAttributes
complementBit :: CAttributes -> Int -> CAttributes
$ctestBit :: CAttributes -> Int -> Bool
testBit :: CAttributes -> Int -> Bool
$cbitSizeMaybe :: CAttributes -> Maybe Int
bitSizeMaybe :: CAttributes -> Maybe Int
$cbitSize :: CAttributes -> Int
bitSize :: CAttributes -> Int
$cisSigned :: CAttributes -> Bool
isSigned :: CAttributes -> Bool
$cshiftL :: CAttributes -> Int -> CAttributes
shiftL :: CAttributes -> Int -> CAttributes
$cunsafeShiftL :: CAttributes -> Int -> CAttributes
unsafeShiftL :: CAttributes -> Int -> CAttributes
$cshiftR :: CAttributes -> Int -> CAttributes
shiftR :: CAttributes -> Int -> CAttributes
$cunsafeShiftR :: CAttributes -> Int -> CAttributes
unsafeShiftR :: CAttributes -> Int -> CAttributes
$crotateL :: CAttributes -> Int -> CAttributes
rotateL :: CAttributes -> Int -> CAttributes
$crotateR :: CAttributes -> Int -> CAttributes
rotateR :: CAttributes -> Int -> CAttributes
$cpopCount :: CAttributes -> Int
popCount :: CAttributes -> Int
Bits)
newtype StatxFlags = StatxFlags CInt deriving (ReadPrec [StatxFlags]
ReadPrec StatxFlags
Int -> ReadS StatxFlags
ReadS [StatxFlags]
(Int -> ReadS StatxFlags)
-> ReadS [StatxFlags]
-> ReadPrec StatxFlags
-> ReadPrec [StatxFlags]
-> Read StatxFlags
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS StatxFlags
readsPrec :: Int -> ReadS StatxFlags
$creadList :: ReadS [StatxFlags]
readList :: ReadS [StatxFlags]
$creadPrec :: ReadPrec StatxFlags
readPrec :: ReadPrec StatxFlags
$creadListPrec :: ReadPrec [StatxFlags]
readListPrec :: ReadPrec [StatxFlags]
Read, Int -> StatxFlags -> ShowS
[StatxFlags] -> ShowS
StatxFlags -> String
(Int -> StatxFlags -> ShowS)
-> (StatxFlags -> String)
-> ([StatxFlags] -> ShowS)
-> Show StatxFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StatxFlags -> ShowS
showsPrec :: Int -> StatxFlags -> ShowS
$cshow :: StatxFlags -> String
show :: StatxFlags -> String
$cshowList :: [StatxFlags] -> ShowS
showList :: [StatxFlags] -> ShowS
Show, StatxFlags -> StatxFlags -> Bool
(StatxFlags -> StatxFlags -> Bool)
-> (StatxFlags -> StatxFlags -> Bool) -> Eq StatxFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StatxFlags -> StatxFlags -> Bool
== :: StatxFlags -> StatxFlags -> Bool
$c/= :: StatxFlags -> StatxFlags -> Bool
/= :: StatxFlags -> StatxFlags -> Bool
Eq, Eq StatxFlags
Eq StatxFlags =>
(StatxFlags -> StatxFlags -> Ordering)
-> (StatxFlags -> StatxFlags -> Bool)
-> (StatxFlags -> StatxFlags -> Bool)
-> (StatxFlags -> StatxFlags -> Bool)
-> (StatxFlags -> StatxFlags -> Bool)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> Ord StatxFlags
StatxFlags -> StatxFlags -> Bool
StatxFlags -> StatxFlags -> Ordering
StatxFlags -> StatxFlags -> StatxFlags
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: StatxFlags -> StatxFlags -> Ordering
compare :: StatxFlags -> StatxFlags -> Ordering
$c< :: StatxFlags -> StatxFlags -> Bool
< :: StatxFlags -> StatxFlags -> Bool
$c<= :: StatxFlags -> StatxFlags -> Bool
<= :: StatxFlags -> StatxFlags -> Bool
$c> :: StatxFlags -> StatxFlags -> Bool
> :: StatxFlags -> StatxFlags -> Bool
$c>= :: StatxFlags -> StatxFlags -> Bool
>= :: StatxFlags -> StatxFlags -> Bool
$cmax :: StatxFlags -> StatxFlags -> StatxFlags
max :: StatxFlags -> StatxFlags -> StatxFlags
$cmin :: StatxFlags -> StatxFlags -> StatxFlags
min :: StatxFlags -> StatxFlags -> StatxFlags
Ord, Enum StatxFlags
Real StatxFlags
(Real StatxFlags, Enum StatxFlags) =>
(StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags))
-> (StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags))
-> (StatxFlags -> Integer)
-> Integral StatxFlags
StatxFlags -> Integer
StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags)
StatxFlags -> StatxFlags -> StatxFlags
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: StatxFlags -> StatxFlags -> StatxFlags
quot :: StatxFlags -> StatxFlags -> StatxFlags
$crem :: StatxFlags -> StatxFlags -> StatxFlags
rem :: StatxFlags -> StatxFlags -> StatxFlags
$cdiv :: StatxFlags -> StatxFlags -> StatxFlags
div :: StatxFlags -> StatxFlags -> StatxFlags
$cmod :: StatxFlags -> StatxFlags -> StatxFlags
mod :: StatxFlags -> StatxFlags -> StatxFlags
$cquotRem :: StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags)
quotRem :: StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags)
$cdivMod :: StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags)
divMod :: StatxFlags -> StatxFlags -> (StatxFlags, StatxFlags)
$ctoInteger :: StatxFlags -> Integer
toInteger :: StatxFlags -> Integer
Integral, Integer -> StatxFlags
StatxFlags -> StatxFlags
StatxFlags -> StatxFlags -> StatxFlags
(StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags)
-> (Integer -> StatxFlags)
-> Num StatxFlags
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: StatxFlags -> StatxFlags -> StatxFlags
+ :: StatxFlags -> StatxFlags -> StatxFlags
$c- :: StatxFlags -> StatxFlags -> StatxFlags
- :: StatxFlags -> StatxFlags -> StatxFlags
$c* :: StatxFlags -> StatxFlags -> StatxFlags
* :: StatxFlags -> StatxFlags -> StatxFlags
$cnegate :: StatxFlags -> StatxFlags
negate :: StatxFlags -> StatxFlags
$cabs :: StatxFlags -> StatxFlags
abs :: StatxFlags -> StatxFlags
$csignum :: StatxFlags -> StatxFlags
signum :: StatxFlags -> StatxFlags
$cfromInteger :: Integer -> StatxFlags
fromInteger :: Integer -> StatxFlags
Num, Int -> StatxFlags
StatxFlags -> Int
StatxFlags -> [StatxFlags]
StatxFlags -> StatxFlags
StatxFlags -> StatxFlags -> [StatxFlags]
StatxFlags -> StatxFlags -> StatxFlags -> [StatxFlags]
(StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags)
-> (Int -> StatxFlags)
-> (StatxFlags -> Int)
-> (StatxFlags -> [StatxFlags])
-> (StatxFlags -> StatxFlags -> [StatxFlags])
-> (StatxFlags -> StatxFlags -> [StatxFlags])
-> (StatxFlags -> StatxFlags -> StatxFlags -> [StatxFlags])
-> Enum StatxFlags
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: StatxFlags -> StatxFlags
succ :: StatxFlags -> StatxFlags
$cpred :: StatxFlags -> StatxFlags
pred :: StatxFlags -> StatxFlags
$ctoEnum :: Int -> StatxFlags
toEnum :: Int -> StatxFlags
$cfromEnum :: StatxFlags -> Int
fromEnum :: StatxFlags -> Int
$cenumFrom :: StatxFlags -> [StatxFlags]
enumFrom :: StatxFlags -> [StatxFlags]
$cenumFromThen :: StatxFlags -> StatxFlags -> [StatxFlags]
enumFromThen :: StatxFlags -> StatxFlags -> [StatxFlags]
$cenumFromTo :: StatxFlags -> StatxFlags -> [StatxFlags]
enumFromTo :: StatxFlags -> StatxFlags -> [StatxFlags]
$cenumFromThenTo :: StatxFlags -> StatxFlags -> StatxFlags -> [StatxFlags]
enumFromThenTo :: StatxFlags -> StatxFlags -> StatxFlags -> [StatxFlags]
Enum, Eq StatxFlags
StatxFlags
Eq StatxFlags =>
(StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags -> StatxFlags)
-> (StatxFlags -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> StatxFlags
-> (Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> Bool)
-> (StatxFlags -> Maybe Int)
-> (StatxFlags -> Int)
-> (StatxFlags -> Bool)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int -> StatxFlags)
-> (StatxFlags -> Int)
-> Bits StatxFlags
Int -> StatxFlags
StatxFlags -> Bool
StatxFlags -> Int
StatxFlags -> Maybe Int
StatxFlags -> StatxFlags
StatxFlags -> Int -> Bool
StatxFlags -> Int -> StatxFlags
StatxFlags -> StatxFlags -> StatxFlags
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
$c.&. :: StatxFlags -> StatxFlags -> StatxFlags
.&. :: StatxFlags -> StatxFlags -> StatxFlags
$c.|. :: StatxFlags -> StatxFlags -> StatxFlags
.|. :: StatxFlags -> StatxFlags -> StatxFlags
$cxor :: StatxFlags -> StatxFlags -> StatxFlags
xor :: StatxFlags -> StatxFlags -> StatxFlags
$ccomplement :: StatxFlags -> StatxFlags
complement :: StatxFlags -> StatxFlags
$cshift :: StatxFlags -> Int -> StatxFlags
shift :: StatxFlags -> Int -> StatxFlags
$crotate :: StatxFlags -> Int -> StatxFlags
rotate :: StatxFlags -> Int -> StatxFlags
$czeroBits :: StatxFlags
zeroBits :: StatxFlags
$cbit :: Int -> StatxFlags
bit :: Int -> StatxFlags
$csetBit :: StatxFlags -> Int -> StatxFlags
setBit :: StatxFlags -> Int -> StatxFlags
$cclearBit :: StatxFlags -> Int -> StatxFlags
clearBit :: StatxFlags -> Int -> StatxFlags
$ccomplementBit :: StatxFlags -> Int -> StatxFlags
complementBit :: StatxFlags -> Int -> StatxFlags
$ctestBit :: StatxFlags -> Int -> Bool
testBit :: StatxFlags -> Int -> Bool
$cbitSizeMaybe :: StatxFlags -> Maybe Int
bitSizeMaybe :: StatxFlags -> Maybe Int
$cbitSize :: StatxFlags -> Int
bitSize :: StatxFlags -> Int
$cisSigned :: StatxFlags -> Bool
isSigned :: StatxFlags -> Bool
$cshiftL :: StatxFlags -> Int -> StatxFlags
shiftL :: StatxFlags -> Int -> StatxFlags
$cunsafeShiftL :: StatxFlags -> Int -> StatxFlags
unsafeShiftL :: StatxFlags -> Int -> StatxFlags
$cshiftR :: StatxFlags -> Int -> StatxFlags
shiftR :: StatxFlags -> Int -> StatxFlags
$cunsafeShiftR :: StatxFlags -> Int -> StatxFlags
unsafeShiftR :: StatxFlags -> Int -> StatxFlags
$crotateL :: StatxFlags -> Int -> StatxFlags
rotateL :: StatxFlags -> Int -> StatxFlags
$crotateR :: StatxFlags -> Int -> StatxFlags
rotateR :: StatxFlags -> Int -> StatxFlags
$cpopCount :: StatxFlags -> Int
popCount :: StatxFlags -> Int
Bits, Num StatxFlags
Ord StatxFlags
(Num StatxFlags, Ord StatxFlags) =>
(StatxFlags -> Rational) -> Real StatxFlags
StatxFlags -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: StatxFlags -> Rational
toRational :: StatxFlags -> Rational
Real)
instance Semigroup StatxFlags where
StatxFlags
a <> :: StatxFlags -> StatxFlags -> StatxFlags
<> StatxFlags
b = StatxFlags
a StatxFlags -> StatxFlags -> StatxFlags
forall a. Bits a => a -> a -> a
.|. StatxFlags
b
instance Monoid StatxFlags where
mappend :: StatxFlags -> StatxFlags -> StatxFlags
mappend = StatxFlags -> StatxFlags -> StatxFlags
forall a. Semigroup a => a -> a -> a
(<>)
mempty :: StatxFlags
mempty = StatxFlags
0
pattern EmptyPath :: StatxFlags
{-# LINE 800 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern EmptyPath = StatxFlags (4096)
{-# LINE 801 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 804 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern NoAutoMount :: StatxFlags
{-# LINE 811 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern NoAutoMount = StatxFlags (2048)
{-# LINE 812 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 815 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern SymlinkNoFollow :: StatxFlags
{-# LINE 819 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern SymlinkNoFollow = StatxFlags (256)
{-# LINE 820 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 823 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern SyncAsStat :: StatxFlags
{-# LINE 827 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern SyncAsStat = StatxFlags (0)
{-# LINE 828 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 831 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern ForceSync :: StatxFlags
{-# LINE 836 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern ForceSync = StatxFlags (8192)
{-# LINE 837 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 840 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern DontSync :: StatxFlags
{-# LINE 846 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern DontSync = StatxFlags (16384)
{-# LINE 847 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# LINE 850 "libraries/unix/System/Posix/Files/Common.hsc" #-}
defaultStatxFlags :: StatxFlags
defaultStatxFlags :: StatxFlags
defaultStatxFlags = StatxFlags
forall a. Monoid a => a
mempty
newtype StatxMask = StatxMask CInt deriving (ReadPrec [StatxMask]
ReadPrec StatxMask
Int -> ReadS StatxMask
ReadS [StatxMask]
(Int -> ReadS StatxMask)
-> ReadS [StatxMask]
-> ReadPrec StatxMask
-> ReadPrec [StatxMask]
-> Read StatxMask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS StatxMask
readsPrec :: Int -> ReadS StatxMask
$creadList :: ReadS [StatxMask]
readList :: ReadS [StatxMask]
$creadPrec :: ReadPrec StatxMask
readPrec :: ReadPrec StatxMask
$creadListPrec :: ReadPrec [StatxMask]
readListPrec :: ReadPrec [StatxMask]
Read, Int -> StatxMask -> ShowS
[StatxMask] -> ShowS
StatxMask -> String
(Int -> StatxMask -> ShowS)
-> (StatxMask -> String)
-> ([StatxMask] -> ShowS)
-> Show StatxMask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StatxMask -> ShowS
showsPrec :: Int -> StatxMask -> ShowS
$cshow :: StatxMask -> String
show :: StatxMask -> String
$cshowList :: [StatxMask] -> ShowS
showList :: [StatxMask] -> ShowS
Show, StatxMask -> StatxMask -> Bool
(StatxMask -> StatxMask -> Bool)
-> (StatxMask -> StatxMask -> Bool) -> Eq StatxMask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StatxMask -> StatxMask -> Bool
== :: StatxMask -> StatxMask -> Bool
$c/= :: StatxMask -> StatxMask -> Bool
/= :: StatxMask -> StatxMask -> Bool
Eq, Eq StatxMask
Eq StatxMask =>
(StatxMask -> StatxMask -> Ordering)
-> (StatxMask -> StatxMask -> Bool)
-> (StatxMask -> StatxMask -> Bool)
-> (StatxMask -> StatxMask -> Bool)
-> (StatxMask -> StatxMask -> Bool)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> Ord StatxMask
StatxMask -> StatxMask -> Bool
StatxMask -> StatxMask -> Ordering
StatxMask -> StatxMask -> StatxMask
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: StatxMask -> StatxMask -> Ordering
compare :: StatxMask -> StatxMask -> Ordering
$c< :: StatxMask -> StatxMask -> Bool
< :: StatxMask -> StatxMask -> Bool
$c<= :: StatxMask -> StatxMask -> Bool
<= :: StatxMask -> StatxMask -> Bool
$c> :: StatxMask -> StatxMask -> Bool
> :: StatxMask -> StatxMask -> Bool
$c>= :: StatxMask -> StatxMask -> Bool
>= :: StatxMask -> StatxMask -> Bool
$cmax :: StatxMask -> StatxMask -> StatxMask
max :: StatxMask -> StatxMask -> StatxMask
$cmin :: StatxMask -> StatxMask -> StatxMask
min :: StatxMask -> StatxMask -> StatxMask
Ord, Enum StatxMask
Real StatxMask
(Real StatxMask, Enum StatxMask) =>
(StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> (StatxMask, StatxMask))
-> (StatxMask -> StatxMask -> (StatxMask, StatxMask))
-> (StatxMask -> Integer)
-> Integral StatxMask
StatxMask -> Integer
StatxMask -> StatxMask -> (StatxMask, StatxMask)
StatxMask -> StatxMask -> StatxMask
forall a.
(Real a, Enum a) =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
$cquot :: StatxMask -> StatxMask -> StatxMask
quot :: StatxMask -> StatxMask -> StatxMask
$crem :: StatxMask -> StatxMask -> StatxMask
rem :: StatxMask -> StatxMask -> StatxMask
$cdiv :: StatxMask -> StatxMask -> StatxMask
div :: StatxMask -> StatxMask -> StatxMask
$cmod :: StatxMask -> StatxMask -> StatxMask
mod :: StatxMask -> StatxMask -> StatxMask
$cquotRem :: StatxMask -> StatxMask -> (StatxMask, StatxMask)
quotRem :: StatxMask -> StatxMask -> (StatxMask, StatxMask)
$cdivMod :: StatxMask -> StatxMask -> (StatxMask, StatxMask)
divMod :: StatxMask -> StatxMask -> (StatxMask, StatxMask)
$ctoInteger :: StatxMask -> Integer
toInteger :: StatxMask -> Integer
Integral, Integer -> StatxMask
StatxMask -> StatxMask
StatxMask -> StatxMask -> StatxMask
(StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask)
-> (StatxMask -> StatxMask)
-> (StatxMask -> StatxMask)
-> (Integer -> StatxMask)
-> Num StatxMask
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
$c+ :: StatxMask -> StatxMask -> StatxMask
+ :: StatxMask -> StatxMask -> StatxMask
$c- :: StatxMask -> StatxMask -> StatxMask
- :: StatxMask -> StatxMask -> StatxMask
$c* :: StatxMask -> StatxMask -> StatxMask
* :: StatxMask -> StatxMask -> StatxMask
$cnegate :: StatxMask -> StatxMask
negate :: StatxMask -> StatxMask
$cabs :: StatxMask -> StatxMask
abs :: StatxMask -> StatxMask
$csignum :: StatxMask -> StatxMask
signum :: StatxMask -> StatxMask
$cfromInteger :: Integer -> StatxMask
fromInteger :: Integer -> StatxMask
Num, Int -> StatxMask
StatxMask -> Int
StatxMask -> [StatxMask]
StatxMask -> StatxMask
StatxMask -> StatxMask -> [StatxMask]
StatxMask -> StatxMask -> StatxMask -> [StatxMask]
(StatxMask -> StatxMask)
-> (StatxMask -> StatxMask)
-> (Int -> StatxMask)
-> (StatxMask -> Int)
-> (StatxMask -> [StatxMask])
-> (StatxMask -> StatxMask -> [StatxMask])
-> (StatxMask -> StatxMask -> [StatxMask])
-> (StatxMask -> StatxMask -> StatxMask -> [StatxMask])
-> Enum StatxMask
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: StatxMask -> StatxMask
succ :: StatxMask -> StatxMask
$cpred :: StatxMask -> StatxMask
pred :: StatxMask -> StatxMask
$ctoEnum :: Int -> StatxMask
toEnum :: Int -> StatxMask
$cfromEnum :: StatxMask -> Int
fromEnum :: StatxMask -> Int
$cenumFrom :: StatxMask -> [StatxMask]
enumFrom :: StatxMask -> [StatxMask]
$cenumFromThen :: StatxMask -> StatxMask -> [StatxMask]
enumFromThen :: StatxMask -> StatxMask -> [StatxMask]
$cenumFromTo :: StatxMask -> StatxMask -> [StatxMask]
enumFromTo :: StatxMask -> StatxMask -> [StatxMask]
$cenumFromThenTo :: StatxMask -> StatxMask -> StatxMask -> [StatxMask]
enumFromThenTo :: StatxMask -> StatxMask -> StatxMask -> [StatxMask]
Enum, Eq StatxMask
StatxMask
Eq StatxMask =>
(StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask -> StatxMask)
-> (StatxMask -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> StatxMask
-> (Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> Bool)
-> (StatxMask -> Maybe Int)
-> (StatxMask -> Int)
-> (StatxMask -> Bool)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int -> StatxMask)
-> (StatxMask -> Int)
-> Bits StatxMask
Int -> StatxMask
StatxMask -> Bool
StatxMask -> Int
StatxMask -> Maybe Int
StatxMask -> StatxMask
StatxMask -> Int -> Bool
StatxMask -> Int -> StatxMask
StatxMask -> StatxMask -> StatxMask
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
$c.&. :: StatxMask -> StatxMask -> StatxMask
.&. :: StatxMask -> StatxMask -> StatxMask
$c.|. :: StatxMask -> StatxMask -> StatxMask
.|. :: StatxMask -> StatxMask -> StatxMask
$cxor :: StatxMask -> StatxMask -> StatxMask
xor :: StatxMask -> StatxMask -> StatxMask
$ccomplement :: StatxMask -> StatxMask
complement :: StatxMask -> StatxMask
$cshift :: StatxMask -> Int -> StatxMask
shift :: StatxMask -> Int -> StatxMask
$crotate :: StatxMask -> Int -> StatxMask
rotate :: StatxMask -> Int -> StatxMask
$czeroBits :: StatxMask
zeroBits :: StatxMask
$cbit :: Int -> StatxMask
bit :: Int -> StatxMask
$csetBit :: StatxMask -> Int -> StatxMask
setBit :: StatxMask -> Int -> StatxMask
$cclearBit :: StatxMask -> Int -> StatxMask
clearBit :: StatxMask -> Int -> StatxMask
$ccomplementBit :: StatxMask -> Int -> StatxMask
complementBit :: StatxMask -> Int -> StatxMask
$ctestBit :: StatxMask -> Int -> Bool
testBit :: StatxMask -> Int -> Bool
$cbitSizeMaybe :: StatxMask -> Maybe Int
bitSizeMaybe :: StatxMask -> Maybe Int
$cbitSize :: StatxMask -> Int
bitSize :: StatxMask -> Int
$cisSigned :: StatxMask -> Bool
isSigned :: StatxMask -> Bool
$cshiftL :: StatxMask -> Int -> StatxMask
shiftL :: StatxMask -> Int -> StatxMask
$cunsafeShiftL :: StatxMask -> Int -> StatxMask
unsafeShiftL :: StatxMask -> Int -> StatxMask
$cshiftR :: StatxMask -> Int -> StatxMask
shiftR :: StatxMask -> Int -> StatxMask
$cunsafeShiftR :: StatxMask -> Int -> StatxMask
unsafeShiftR :: StatxMask -> Int -> StatxMask
$crotateL :: StatxMask -> Int -> StatxMask
rotateL :: StatxMask -> Int -> StatxMask
$crotateR :: StatxMask -> Int -> StatxMask
rotateR :: StatxMask -> Int -> StatxMask
$cpopCount :: StatxMask -> Int
popCount :: StatxMask -> Int
Bits, Num StatxMask
Ord StatxMask
(Num StatxMask, Ord StatxMask) =>
(StatxMask -> Rational) -> Real StatxMask
StatxMask -> Rational
forall a. (Num a, Ord a) => (a -> Rational) -> Real a
$ctoRational :: StatxMask -> Rational
toRational :: StatxMask -> Rational
Real)
instance Semigroup StatxMask where
StatxMask
a <> :: StatxMask -> StatxMask -> StatxMask
<> StatxMask
b = StatxMask
a StatxMask -> StatxMask -> StatxMask
forall a. Bits a => a -> a -> a
.|. StatxMask
b
instance Monoid StatxMask where
mappend :: StatxMask -> StatxMask -> StatxMask
mappend = StatxMask -> StatxMask -> StatxMask
forall a. Semigroup a => a -> a -> a
(<>)
mempty :: StatxMask
mempty = StatxMask
0
pattern StatxType :: StatxMask
{-# LINE 873 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxType :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxType :: StatxMask
StatxType = StatxMask 0
{-# LINE 875 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxMode :: StatxMask
{-# LINE 881 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxMode :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxMode :: StatxMask
StatxMode = StatxMask 0
{-# LINE 883 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxNlink :: StatxMask
{-# LINE 889 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxNlink :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxNlink :: StatxMask
StatxNlink = StatxMask 0
{-# LINE 891 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxUid :: StatxMask
{-# LINE 897 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxUid :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxUid :: StatxMask
StatxUid = StatxMask 0
{-# LINE 899 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxGid :: StatxMask
{-# LINE 905 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxGid :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxGid :: StatxMask
StatxGid = StatxMask 0
{-# LINE 907 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxAtime :: StatxMask
{-# LINE 913 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxAtime :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxAtime :: StatxMask
StatxAtime = StatxMask 0
{-# LINE 915 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxMtime :: StatxMask
{-# LINE 921 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxMtime :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxMtime :: StatxMask
StatxMtime = StatxMask 0
{-# LINE 923 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxCtime :: StatxMask
{-# LINE 929 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxCtime :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxCtime :: StatxMask
StatxCtime = StatxMask 0
{-# LINE 931 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxBtime :: StatxMask
{-# LINE 937 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxBtime :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxBtime :: StatxMask
StatxBtime = StatxMask 0
{-# LINE 939 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxMntId :: StatxMask
{-# LINE 945 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxMntId :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxMntId :: StatxMask
StatxMntId = StatxMask 0
{-# LINE 947 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxIno :: StatxMask
{-# LINE 953 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxIno :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxIno :: StatxMask
StatxIno = StatxMask 0
{-# LINE 955 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxSize :: StatxMask
{-# LINE 961 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxSize :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxSize :: StatxMask
StatxSize = StatxMask 0
{-# LINE 963 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxBlocks :: StatxMask
{-# LINE 969 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxBlocks :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxBlocks :: StatxMask
StatxBlocks = StatxMask 0
{-# LINE 971 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxBasicStats :: StatxMask
{-# LINE 977 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxBasicStats :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxBasicStats :: StatxMask
StatxBasicStats = StatxMask 0
{-# LINE 979 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern StatxAll :: StatxMask
{-# LINE 985 "libraries/unix/System/Posix/Files/Common.hsc" #-}
pattern $mStatxAll :: forall {r}. StatxMask -> ((# #) -> r) -> ((# #) -> r) -> r
$bStatxAll :: StatxMask
StatxAll = StatxMask 0
{-# LINE 987 "libraries/unix/System/Posix/Files/Common.hsc" #-}
defaultStatxMask :: StatxMask
defaultStatxMask :: StatxMask
defaultStatxMask = StatxMask
forall a. Monoid a => a
mempty
newtype ExtendedFileStatus = ExtendedFileStatus (ForeignPtr CStatx)
fileBlockSizeX :: ExtendedFileStatus -> CBlkSize
{-# LINE 1001 "libraries/unix/System/Posix/Files/Common.hsc" #-}
linkCountX :: ExtendedFileStatus -> CNlink
fileOwnerX :: ExtendedFileStatus -> UserID
fileGroupX :: ExtendedFileStatus -> GroupID
fileModeX :: ExtendedFileStatus -> FileMode
fileIDX :: ExtendedFileStatus -> FileID
fileSizeX :: ExtendedFileStatus -> Word64
fileBlocksX :: ExtendedFileStatus -> Word64
{-# LINE 1022 "libraries/unix/System/Posix/Files/Common.hsc" #-}
accessTimeHiResX :: ExtendedFileStatus -> POSIXTime
creationTimeHiResX :: ExtendedFileStatus -> POSIXTime
statusChangeTimeHiResX :: ExtendedFileStatus -> POSIXTime
modificationTimeHiResX :: ExtendedFileStatus -> POSIXTime
deviceIDX :: ExtendedFileStatus -> DeviceID
specialDeviceIDX :: ExtendedFileStatus -> DeviceID
mountIDX :: ExtendedFileStatus -> Word64
fileCompressedX :: ExtendedFileStatus -> Bool
fileImmutableX :: ExtendedFileStatus -> Bool
fileAppendX :: ExtendedFileStatus -> Bool
fileNoDumpX :: ExtendedFileStatus -> Bool
fileEncryptedX :: ExtendedFileStatus -> Bool
fileVerityX :: ExtendedFileStatus -> Bool
fileDaxX :: ExtendedFileStatus -> Bool
isBlockDeviceX :: ExtendedFileStatus -> Bool
isCharacterDeviceX :: ExtendedFileStatus -> Bool
isNamedPipeX :: ExtendedFileStatus -> Bool
isRegularFileX :: ExtendedFileStatus -> Bool
isDirectoryX :: ExtendedFileStatus -> Bool
isSymbolicLinkX :: ExtendedFileStatus -> Bool
isSocketX :: ExtendedFileStatus -> Bool
isBlockDeviceX :: ExtendedFileStatus -> Bool
isBlockDeviceX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
blockSpecialMode
isCharacterDeviceX :: ExtendedFileStatus -> Bool
isCharacterDeviceX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
characterSpecialMode
isNamedPipeX :: ExtendedFileStatus -> Bool
isNamedPipeX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
namedPipeMode
isRegularFileX :: ExtendedFileStatus -> Bool
isRegularFileX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
regularFileMode
isDirectoryX :: ExtendedFileStatus -> Bool
isDirectoryX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
directoryMode
isSymbolicLinkX :: ExtendedFileStatus -> Bool
isSymbolicLinkX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
symbolicLinkMode
isSocketX :: ExtendedFileStatus -> Bool
isSocketX ExtendedFileStatus
statx =
(ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
statx FileMode -> FileMode -> FileMode
`intersectFileModes` FileMode
fileTypeModes) FileMode -> FileMode -> Bool
forall a. Eq a => a -> a -> Bool
== FileMode
socketMode
{-# LINE 1272 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# WARNING linkCountX "linkCountX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
linkCountX :: ExtendedFileStatus -> LinkCount
linkCountX ExtendedFileStatus
_ = String -> LinkCount
forall a. HasCallStack => String -> a
error String
"linkCountX not available on this platform"
{-# WARNING fileBlockSizeX "fileBlockSizeX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileBlockSizeX :: ExtendedFileStatus -> CBlkSize
fileBlockSizeX ExtendedFileStatus
_ = String -> CBlkSize
forall a. HasCallStack => String -> a
error String
"fileBlockSizeX not available on this platform"
{-# WARNING deviceIDX "deviceIDX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
deviceIDX :: ExtendedFileStatus -> DeviceID
deviceIDX ExtendedFileStatus
_ = String -> DeviceID
forall a. HasCallStack => String -> a
error String
"deviceIDX not available on this platform"
{-# WARNING specialDeviceIDX "specialDeviceIDX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
specialDeviceIDX :: ExtendedFileStatus -> DeviceID
specialDeviceIDX ExtendedFileStatus
_ = String -> DeviceID
forall a. HasCallStack => String -> a
error String
"specialDeviceIDX not available on this platform"
{-# WARNING mountIDX "mountIDX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
mountIDX :: ExtendedFileStatus -> Word64
mountIDX ExtendedFileStatus
_ = String -> Word64
forall a. HasCallStack => String -> a
error String
"mountIDX not available on this platform"
{-# WARNING fileOwnerX "fileOwnerX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileOwnerX :: ExtendedFileStatus -> UserID
fileOwnerX ExtendedFileStatus
_ = String -> UserID
forall a. HasCallStack => String -> a
error String
"fileOwnerX not available on this platform"
{-# WARNING fileGroupX "fileGroupX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileGroupX :: ExtendedFileStatus -> GroupID
fileGroupX ExtendedFileStatus
_ = String -> GroupID
forall a. HasCallStack => String -> a
error String
"fileGroupX not available on this platform"
{-# WARNING fileModeX "fileModeX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileModeX :: ExtendedFileStatus -> FileMode
fileModeX ExtendedFileStatus
_ = String -> FileMode
forall a. HasCallStack => String -> a
error String
"fileModeX not available on this platform"
{-# WARNING fileIDX "fileIDX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileIDX :: ExtendedFileStatus -> FileID
fileIDX ExtendedFileStatus
_ = String -> FileID
forall a. HasCallStack => String -> a
error String
"fileIDX not available on this platform"
{-# WARNING fileSizeX "fileSizeX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileSizeX :: ExtendedFileStatus -> Word64
fileSizeX ExtendedFileStatus
_ = String -> Word64
forall a. HasCallStack => String -> a
error String
"fileSizeX not available on this platform"
{-# WARNING fileBlocksX "fileBlocksX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
fileBlocksX :: ExtendedFileStatus -> Word64
fileBlocksX ExtendedFileStatus
_ = String -> Word64
forall a. HasCallStack => String -> a
error String
"fileBlocksX not available on this platform"
{-# WARNING accessTimeHiResX "accessTimeHiResX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
accessTimeHiResX :: ExtendedFileStatus -> POSIXTime
accessTimeHiResX ExtendedFileStatus
_ = String -> POSIXTime
forall a. HasCallStack => String -> a
error String
"accessTimeHiResX not available on this platform"
{-# WARNING creationTimeHiResX "creationTimeHiResX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
creationTimeHiResX :: ExtendedFileStatus -> POSIXTime
creationTimeHiResX ExtendedFileStatus
_ = String -> POSIXTime
forall a. HasCallStack => String -> a
error String
"creationTimeHiResX not available on this platform"
{-# WARNING statusChangeTimeHiResX "statusChangeTimeHiResX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
statusChangeTimeHiResX :: ExtendedFileStatus -> POSIXTime
statusChangeTimeHiResX ExtendedFileStatus
_ = String -> POSIXTime
forall a. HasCallStack => String -> a
error String
"statusChangeTimeHiResX not available on this platform"
{-# WARNING modificationTimeHiResX "modificationTimeHiResX: not available on this platform, will throw error (CPP guard: @#if HAVE_STATX@)" #-}
modificationTimeHiResX :: ExtendedFileStatus -> POSIXTime
modificationTimeHiResX ExtendedFileStatus
_ = String -> POSIXTime
forall a. HasCallStack => String -> a
error String
"modificationTimeHiResX not available on this platform"
{-# WARNING fileCompressedX "fileCompressedX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileCompressedX :: ExtendedFileStatus -> Bool
fileCompressedX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileImmutableX "fileImmutableX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileImmutableX :: ExtendedFileStatus -> Bool
fileImmutableX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileAppendX "fileAppendX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileAppendX :: ExtendedFileStatus -> Bool
fileAppendX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileNoDumpX "fileNoDumpX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileNoDumpX :: ExtendedFileStatus -> Bool
fileNoDumpX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileEncryptedX "fileEncryptedX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileEncryptedX :: ExtendedFileStatus -> Bool
fileEncryptedX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileVerityX "fileVerityX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileVerityX :: ExtendedFileStatus -> Bool
fileVerityX ExtendedFileStatus
_ = Bool
False
{-# WARNING fileDaxX "fileDaxX: not available on this platform, will default to 'False' (CPP guard: @#if HAVE_STATX@)" #-}
fileDaxX :: ExtendedFileStatus -> Bool
fileDaxX ExtendedFileStatus
_ = Bool
False
{-# LINE 1317 "libraries/unix/System/Posix/Files/Common.hsc" #-}
data {-# CTYPE "struct statx" #-} CStatx
{-# LINE 1329 "libraries/unix/System/Posix/Files/Common.hsc" #-}
getExtendedFileStatus_ :: Maybe Fd
-> CString
-> StatxFlags
-> StatxMask
-> IO ExtendedFileStatus
{-# LINE 1345 "libraries/unix/System/Posix/Files/Common.hsc" #-}
{-# WARNING getExtendedFileStatus_ "operation will throw 'IOError' \"unsupported operation\" (CPP guard: @#if HAVE_STATX@)" #-}
getExtendedFileStatus_ :: Maybe Fd
-> CString -> StatxFlags -> StatxMask -> IO ExtendedFileStatus
getExtendedFileStatus_ Maybe Fd
_ CString
_ StatxFlags
_ StatxMask
_ = IOError -> IO ExtendedFileStatus
forall a. IOError -> IO a
ioError (IOError -> String -> IOError
ioeSetLocation IOError
unsupportedOperation String
"getExtendedFileStatus")
{-# LINE 1348 "libraries/unix/System/Posix/Files/Common.hsc" #-}