wyqydsyq
wyqydsyq

Reputation: 2030

Does fileatime() "access" the file?

I was wondering whether or not fileatime counts as having accessed the file?

I'm assuming not as the function should really only need to access the filesystem metadata for the file rather than the file itself - is this correct?

Upvotes: 4

Views: 110

Answers (2)

Pierre Geier
Pierre Geier

Reputation: 582

Yes it has to be accessing the filesystem, because only the filesystem has the modtime, creationtime and accesstime saved.

Upvotes: 2

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799092

That is correct. The underlying stat() call does not modify the file metadata.

Upvotes: 4

Related Questions