Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-05-08 05:13:00


richard_fanta wrote:
> --- In Boost-Users_at_[hidden], "Ben Hutchings"
> <ben.hutchings_at_b...> wrote:
>
>> Access times are far from a universal OS feature,
>
> On which specific (and hopefully widespread) examples do you base
> this?

FAT?

>> and updates to them may be disabled because the volume is read-only
>> (whether or not the underlying medium is read-only) or purely to
>> avoid the cost of updating them.
>
> Even if the volume is read-only from one machine, it might still help
> to know when the file was last altered.

This is a misunderstanding. Last access time (struct stat::st_atime) and
creation time (st_ctime) aren't universal. Modification time (st_mtime) is
common, except on read-only filesystems, which typically only have ctime.
Judging by your "last altered" remark, you mean mtime but call it "last
access."

I think that it would be entirely reasonable (and very useful - can avoid
reading a file if it hasn't changed since last read) to provide mtime. On
read-only filesystems, the creation time should be returned.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net