Wed 19 Jul 2006 05:35:53 PM UTC, comment #10:
quote: Files that were modified by the update, keep their old mtime.
I assume you ment to say NOT modified ?
This behavior is different/better than subversion, which always modifies the mtime, as far as I can tell, from the testing that I did.
-------------
quote: (I hope win32 does not call file creation time "ctime", that would make things even more horribly confusing.)
Ah, no wonder I am so confused. In the windows api ctime does refer to "creation time". I did assume that in Linux, references to ctime meant CREATION time. Below are excerpts from the windows api manual.
Thank you for being so patient and explaining this to me, I appreciate it. I am ignorant not stupid, there is a difference.
I am puzzeled that Linux lacks this property/concept. I'm fairly new to *nix, and don't claim to be a file systems expert, but every other file system I've delt with from the Heath H8 on up, has had this concept. People like to know when something was created and windows goes to great lengths to preserve this value.
-------------------------
Excerpts from Windows api manual:
The _fstat function obtains information about the open file associated with handle and stores it in the structure pointed to by buffer. The _stat structure, defined in SYS\STAT.H, contains the following fields:
st_atime - Time of last file access.
st_ctime - Time of creation of file.
st_mtime - Time of last modification of file.
--------------------
The STATSTG structure contains statistical information about an open storage, stream, or byte array object. This structure is used in the IEnumSTATSTG, ILockBytes, IStorage, and IStream interfaces.
typedef struct tagSTATSTG
{
LPWSTR pwcsName;
DWORD type;
ULARGE_INTEGER cbSize;
FILETIME mtime;
FILETIME ctime;
FILETIME atime;
DWORD grfMode;
DWORD grfLocksSupported;
CLSID clsid;
DWORD grfStateBits;
DWORD reserved;
} STATSTG;
mtime - Indicates the last modification time for this storage, stream, or byte array.
ctime - Indicates the creation time for this storage, stream, or byte array.
atime - Indicates the last access time for this storage, stream or byte array.
--------------------
{In the windows api, all file time properties are settable; but only on files, not folders}
The SetFileTime function sets the date and time that a file was created, last accessed, or last modified.
BOOL SetFileTime(
HANDLE hFile, // handle to the file
CONST FILETIME *lpCreationTime, // time the file was created
CONST FILETIME *lpLastAccessTime, // time the file was last accessed
CONST FILETIME *lpLastWriteTime // time the file was last written
);
The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601.
|