Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
struct stat
in Haskell.
Synopsis
- data FileStat = FileStat {}
- defaultFileStat :: FileStat
- getFileStat :: FilePath -> IO FileStat
- getFileStatFd :: Fd -> IO FileStat
Documentation
A file status a.k.a. metadata.
The differences from FileStatus
are:
- Is a record type with a
Storable
instance. Has an extra field
blockCount
.- An equivalent accessor
fileBlocks
was added in unix-2.8.0.0, but it is aMaybe
.
- An equivalent accessor
Provides an exact representation (
TimeSpec
) of the time fields without converting toPOSIXTime
.- This assumes that the
struct stat
hasst_atim
,st_mtim
andst_ctim
fields. On Linux this requires Linux >= 2.6.
- This assumes that the
Ptr FileStat
can be cast to Ptr
and vice versa.CStat
Use defaultFileStat
and modify its fields you are interested in.
The st_ino
field is ignored unless the use_ino
mount option is given.
The st_dev
and st_blksize
fields are ignored by libfuse, so not provided.
FileStat | |
|
Instances
Storable FileStat Source # | Targets |
Defined in System.LibFuse3.FileStat sizeOf :: FileStat -> Int Source # alignment :: FileStat -> Int Source # peekElemOff :: Ptr FileStat -> Int -> IO FileStat Source # pokeElemOff :: Ptr FileStat -> Int -> FileStat -> IO () Source # peekByteOff :: Ptr b -> Int -> IO FileStat Source # pokeByteOff :: Ptr b -> Int -> FileStat -> IO () Source # | |
Show FileStat Source # | |
Eq FileStat Source # | |
defaultFileStat :: FileStat Source #
The default value of FileStat
.
The Haskell Equivalent of zero-setting C code { struct stat st; memset(&st, 0, sizeof(struct stat)); }
.