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
. 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
Eq FileStat Source # | |
Show FileStat Source # | |
Storable FileStat Source # | Targets |
Defined in System.LibFuse3.FileStat |
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)); }
.