File tree Expand file tree Collapse file tree 6 files changed +17
-1
lines changed Expand file tree Collapse file tree 6 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ module System.Posix.Files (
66
66
-- * Extended file status
67
67
ExtendedFileStatus (.. ),
68
68
CAttributes (.. ),
69
+ haveStatx ,
69
70
-- ** Obtaining extended file status
70
71
getExtendedFileStatus ,
71
72
-- ** Flags
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ module System.Posix.Files.ByteString (
66
66
-- * Extended file status
67
67
ExtendedFileStatus (.. ),
68
68
CAttributes (.. ),
69
+ haveStatx ,
69
70
-- ** Obtaining extended file status
70
71
getExtendedFileStatus ,
71
72
-- ** Flags
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ module System.Posix.Files.Common (
122
122
isDirectoryX ,
123
123
isSymbolicLinkX ,
124
124
isSocketX ,
125
+ haveStatx ,
125
126
126
127
-- * Setting file sizes
127
128
setFdSize ,
@@ -1346,3 +1347,11 @@ getExtendedFileStatus_ fdMay str (StatxFlags flags) (StatxMask masks) = do
1346
1347
getExtendedFileStatus_ _ _ _ _ = ioError (ioeSetLocation unsupportedOperation " getExtendedFileStatus" )
1347
1348
#endif
1348
1349
1350
+ -- | Whether 'statx' is available on this platform and 'getExtendedFileStatus' and
1351
+ -- related functions will work.
1352
+ haveStatx :: Bool
1353
+ #ifdef HAVE_STATX
1354
+ haveStatx = True
1355
+ #else
1356
+ haveStatx = False
1357
+ #endif
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ module System.Posix.Files.PosixString (
62
62
-- * Extended file status
63
63
ExtendedFileStatus (.. ),
64
64
CAttributes (.. ),
65
+ haveStatx ,
65
66
-- ** Obtaining extended file status
66
67
getExtendedFileStatus ,
67
68
-- ** Flags
Original file line number Diff line number Diff line change 1
1
# Changelog for [ ` unix ` package] ( http://hackage.haskell.org/package/unix )
2
2
3
+ ## 2.8.4.0 * ??? 2023*
4
+
5
+ * add ` haveStatx `
6
+
3
7
## 2.8.3.0 * Oct 2023*
4
8
5
9
* add ` getExtendedFileStatus ` (based on ` statx ` ) style functions
Original file line number Diff line number Diff line change 1
1
cabal-version : 1.12
2
2
name : unix
3
- version : 2.8.3 .0
3
+ version : 2.8.4 .0
4
4
-- NOTE: Don't forget to update ./changelog.md
5
5
6
6
license : BSD3
You can’t perform that action at this time.
0 commit comments