Discussion:
File considered modified
(too old to reply)
Snurre Sprett
2020-04-15 15:38:31 UTC
Permalink
Many file-manager etc. use the term "Modified" in the
file-view column of a file. But what does that
really means?

E.g. information from the FindFirstFile() / FindNextFile(),
contains these 'WIN32_FIND_DATA' members:
ftCreationTime
ftLastWriteTime

"Modified" == the maximum of 'ftLastWriteTime' and
'ftCreationTime'?

Is there another API-function that can give the term
"Modified" a more precise meaning?
R.Wieser
2020-04-15 17:12:03 UTC
Permalink
Snurre,
Post by Snurre Sprett
ftCreationTime
ftLastWriteTime
You missed one, "ftLastAccessTime".
Post by Snurre Sprett
use the term "Modified" in the file-view column of a file. But what does
that really means?
Modified means the time you possibly last changed the contents of the file.

I say "possibly", as opening the file for write and than not actually
writing anything does, AFAIK, update that "ftLastWriteTime" too.
Post by Snurre Sprett
"Modified" == the maximum of 'ftLastWriteTime' and
'ftCreationTime'?
Nope. The time you created the file is (should be) set only once. Though
its possible that a /copied/ file gets the date of copying for it, meaning
that it its "created" date can be later than its "modified" date. Yeah, a
bit of a head-scratcher when I first noticed that. :-)
Post by Snurre Sprett
Is there another API-function that can give the term
"Modified" a more precise meaning?
Not that I know of.

Regards,
Rudy Wieser
Snurre Sprett
2020-04-15 17:39:58 UTC
Permalink
Post by R.Wieser
I say "possibly", as opening the file for write and than not actually
writing anything does, AFAIK, update that "ftLastWriteTime" too.
Post by Snurre Sprett
"Modified" == the maximum of 'ftLastWriteTime' and
'ftCreationTime'?
Nope. The time you created the file is (should be) set only once. Though
its possible that a /copied/ file gets the date of copying for it, meaning
that it its "created" date can be later than its "modified" date. Yeah, a
bit of a head-scratcher when I first noticed that. :-)
Oh dear. But thanks for the info.

Loading...