Re: os.stat access and modify time same on WinXP

From: Peter Hansen (peter_at_engcorp.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 12:02:02 -0500

rbt wrote:
> I'm using the standard NTFS file system. The only time the access time
> is updated is when the file is modified or saved (with no changes).
> What's up with that? Shouldn't a read/view update the access time?

See
http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/Default.asp?url=/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_punq.asp

Quoting:
'''
The Last Access Time on disk is not always current because NTFS looks
for a one-hour interval before forcing the Last Access Time updates to
disk. NTFS also delays writing the Last Access Time to disk when users
or programs perform read-only operations on a file or folder, such as
listing the folder's contents or reading (but not changing) a file in
the folder. If the Last Access Time is kept current on disk for read
operations, all read operations become write operations, which impacts
NTFS performance.

Note

     * File-based queries of Last Access Time are accurate even if all
on-disk values are not current. NTFS returns the correct value on
queries because the accurate value is stored in memory.
'''

Does that help?

(Just went through this myself the other day.)
-Peter



Relevant Pages

  • Re: NTFS not maintaining "last access time" correctly
    ... with their system if it is not behaving the way it is supposed to. ... The reason I found this issue with NTFS ... NTFS maintains "last access time" ... NTFS typically updates a file's attribute on disk if the current Last ...
    (microsoft.public.windowsxp.general)
  • NTFS not maintaining "last access time" correctly
    ... NTFS not maintaining "last access time" correctly ... NTFS typically updates a file's attribute on disk if the current Last Access ... up-to-date LAT at least. ...
    (microsoft.public.windowsxp.general)
  • Re: os.stat access and modify time same on WinXP
    ... >> I'm using the standard NTFS file system. ... > The Last Access Time on disk is not always current because NTFS looks ... > or programs perform read-only operations on a file or folder, ...
    (comp.lang.python)
  • Re: NTFS not maintaining "last access time" correctly
    ... As useless as LAT is, I'm real curious why it matters? ... NTFS maintains "last access time" ... Each file and folder on an NTFS volume contains an attribute called ... NTFS typically updates a file's attribute on disk if the current Last ...
    (microsoft.public.windowsxp.general)
  • Re: NtfsDisableLastAccessUpdate
    ... Last Access Time improves the speed of folder and file access. ... Each file and folder on an NTFS volume contains an attribute called Last ... NTFS typically updates a file's attribute on disk if the current Last Access ... Mir ist beim recherchieren über diesen Reg-Schlüssel nachfolgendes ...
    (microsoft.public.de.german.allgemein)