Does a file operation (move, rename) change last modified field of a file?

689 views Asked by At

What does "lastmodified" describe? Just the file's content or also file system related things like file name and Path?

My interest goes especially for the Android platform. I will store data in my app's directory. A quick test showed, that a Samsung Android device with Android 4.2.2 does not change the date when moving files with the build in file browser.

1

There are 1 answers

0
tibbi On BEST ANSWER

from my experience it doesnt change it. After such operations I manually do

file.setLastModified(System.currentTimeMillis());