@@ -231,6 +231,11 @@ setFileCreationMask mask = c_umask mask
231
231
-- 'FileStatus' type.
232
232
--
233
233
-- Note: see @chmod@.
234
+ --
235
+ -- Limitations: Support for high resolution timestamps is filesystem dependent:
236
+ --
237
+ -- - HFS+ volumes on OS X only support whole-second times.
238
+ --
234
239
newtype FileStatus = FileStatus (ForeignPtr CStat )
235
240
236
241
-- | ID of the device on which this file resides.
@@ -252,15 +257,18 @@ specialDeviceID :: FileStatus -> DeviceID
252
257
fileSize :: FileStatus -> FileOffset
253
258
-- | Time of last access.
254
259
accessTime :: FileStatus -> EpochTime
255
- -- | Time of last access in sub-second resolution.
260
+ -- | Time of last access in sub-second resolution. Depends on the timestamp resolution of the
261
+ -- underlying filesystem.
256
262
accessTimeHiRes :: FileStatus -> POSIXTime
257
263
-- | Time of last modification.
258
264
modificationTime :: FileStatus -> EpochTime
259
- -- | Time of last modification in sub-second resolution.
265
+ -- | Time of last modification in sub-second resolution. Depends on the timestamp resolution of the
266
+ -- underlying filesystem.
260
267
modificationTimeHiRes :: FileStatus -> POSIXTime
261
268
-- | Time of last status change (i.e. owner, group, link count, mode, etc.).
262
269
statusChangeTime :: FileStatus -> EpochTime
263
270
-- | Time of last status change (i.e. owner, group, link count, mode, etc.) in sub-second resolution.
271
+ -- Depends on the timestamp resolution of the underlying filesystem.
264
272
statusChangeTimeHiRes :: FileStatus -> POSIXTime
265
273
266
274
deviceID (FileStatus stat) =
@@ -465,7 +473,11 @@ foreign import ccall unsafe "futimes"
465
473
-- This operation is not supported on all platforms. On these platforms,
466
474
-- this function will raise an exception.
467
475
--
468
- -- Note: calls @futimens@ or @futimes@.
476
+ -- Note: calls @futimens@ or @futimes@. Support for high resolution timestamps
477
+ -- is filesystem dependent with the following limitations:
478
+ --
479
+ -- - HFS+ volumes on OS X truncate the sub-second part of the timestamp.
480
+ --
469
481
--
470
482
-- @since 2.7.0.0
471
483
setFdTimesHiRes :: Fd -> POSIXTime -> POSIXTime -> IO ()
0 commit comments