Skip to content
Snippets Groups Projects
Commit 3e7dcbc1 authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Add haveStatx

parent 83ee24f7
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ module System.Posix.Files ( ...@@ -66,6 +66,7 @@ module System.Posix.Files (
-- * Extended file status -- * Extended file status
ExtendedFileStatus(..), ExtendedFileStatus(..),
CAttributes(..), CAttributes(..),
haveStatx,
-- ** Obtaining extended file status -- ** Obtaining extended file status
getExtendedFileStatus, getExtendedFileStatus,
-- ** Flags -- ** Flags
......
...@@ -66,6 +66,7 @@ module System.Posix.Files.ByteString ( ...@@ -66,6 +66,7 @@ module System.Posix.Files.ByteString (
-- * Extended file status -- * Extended file status
ExtendedFileStatus(..), ExtendedFileStatus(..),
CAttributes(..), CAttributes(..),
haveStatx,
-- ** Obtaining extended file status -- ** Obtaining extended file status
getExtendedFileStatus, getExtendedFileStatus,
-- ** Flags -- ** Flags
......
...@@ -122,6 +122,7 @@ module System.Posix.Files.Common ( ...@@ -122,6 +122,7 @@ module System.Posix.Files.Common (
isDirectoryX, isDirectoryX,
isSymbolicLinkX, isSymbolicLinkX,
isSocketX, isSocketX,
haveStatx,
-- * Setting file sizes -- * Setting file sizes
setFdSize, setFdSize,
...@@ -1346,3 +1347,11 @@ getExtendedFileStatus_ fdMay str (StatxFlags flags) (StatxMask masks) = do ...@@ -1346,3 +1347,11 @@ getExtendedFileStatus_ fdMay str (StatxFlags flags) (StatxMask masks) = do
getExtendedFileStatus_ _ _ _ _ = ioError (ioeSetLocation unsupportedOperation "getExtendedFileStatus") getExtendedFileStatus_ _ _ _ _ = ioError (ioeSetLocation unsupportedOperation "getExtendedFileStatus")
#endif #endif
-- | Whether 'statx' is available on this platform and 'getExtendedFileStatus' and
-- related functions will work.
haveStatx :: Bool
#ifdef HAVE_STATX
haveStatx = True
#else
haveStatx = False
#endif
...@@ -62,6 +62,7 @@ module System.Posix.Files.PosixString ( ...@@ -62,6 +62,7 @@ module System.Posix.Files.PosixString (
-- * Extended file status -- * Extended file status
ExtendedFileStatus(..), ExtendedFileStatus(..),
CAttributes(..), CAttributes(..),
haveStatx,
-- ** Obtaining extended file status -- ** Obtaining extended file status
getExtendedFileStatus, getExtendedFileStatus,
-- ** Flags -- ** Flags
......
# Changelog for [`unix` package](http://hackage.haskell.org/package/unix) # Changelog for [`unix` package](http://hackage.haskell.org/package/unix)
## 2.8.4.0 *??? 2023*
* add `haveStatx`
## 2.8.3.0 *Oct 2023* ## 2.8.3.0 *Oct 2023*
* add `getExtendedFileStatus` (based on `statx`) style functions * add `getExtendedFileStatus` (based on `statx`) style functions
......
cabal-version: 1.12 cabal-version: 1.12
name: unix name: unix
version: 2.8.3.0 version: 2.8.4.0
-- NOTE: Don't forget to update ./changelog.md -- NOTE: Don't forget to update ./changelog.md
license: BSD3 license: BSD3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment