How to detect when modified time (mtime) returned by stat/lstat cannot be trusted
0
votes
1
answer
91
views
stat
returns the last modified time of a file, but I'm under the impression that it's not always updated correctly, e.g. due to the lazytime
mount option or just the driver for some weird virtual or remote filesystem not implementing that properly.
1. Is my impression accurate or is mtime actually pretty reliable?
2. Is there some clever way to detect whether the returned mtime is meaningful in code, given that the user running that code does not have write access to the file nor to its directory?
Asked by EM0
(505 rep)
Nov 12, 2024, 05:32 PM
Last activity: Nov 12, 2024, 08:09 PM
Last activity: Nov 12, 2024, 08:09 PM