Proposal: better timestamp granularity for modificationTime/setFileTimes in System.Posix.Files[.ByteString]
Marios Titas
redneb8888 at gmail.com
Tue Jun 12 01:14:47 CEST 2012
On Mon, Jun 11, 2012 at 2:04 PM, Brandon Allbery <allbery.b at gmail.com> wrote:
> On Mon, Jun 11, 2012 at 9:25 AM, Marios Titas <redneb8888 at gmail.com> wrote:
>>
>> System.Posix.Files[.ByteString] contains the following functions
>> related to file times: accessTime, modificationTime, statusChangeTime,
>> setFileTimes.
>> All of these functions offer granularity of one second. Modern posix
>> systems support newer functions (such as utimes, utimensat) that offer
>> better granularity (up to 1 nanosecond).
>
>
> Be aware that how these are provided varies: Solaris, FreeBSD, and Linux
> use different extensions and different types to represent them.
Yes, I am well aware of that. What I meant is to pick the best
function available using #ifdef's and then convert the timestamps to
a common type (such as POSIXTime from Data.Time.Clock.POSIX)
irrespective of what function was actually used.
More information about the Libraries
mailing list