[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX ruling on up-to-date vs. identical timestamps

From: Paul Eggert
Subject: Re: POSIX ruling on up-to-date vs. identical timestamps
Date: Tue, 26 Aug 2014 08:25:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Paul Smith wrote:
It's trivial to determine the filesystem in POSIX via the
device ID available from stat()

Yes, that's what the Gnulib utimecmp module does: the idea is that after every stat-like operation you look at the file's time stamps to infer more information about the containing file system's resolution.

As far as Windows goes, NTFS file systems have 100 ns resolution, and FAT file systems are the joker as they have a 2-second resolution for last-modified time.

While we're on the topic, perhaps I should warn you that in old buggy Linux kernels file time stamps could spontaneously be truncated to file system resolution. According to <> this bug was introduced into the Linux kernel in 2002; I don't recall when it was fixed in Linux, but a few years later POSIX prohibited the buggy behavior.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]