设置的Android最后修改时间为文件 [英] Android set last modified time for the file
问题描述
我一直在使用公共布尔setLastModified(时间长)设置的修改文件的时间,但它始终返回false。我已经看到了与此相关的几个类似的职位,但没有一个人能为我工作。能有人给我这个解决方案?
I have been using " public boolean setLastModified (long time) " for setting the file modified time but it always return false. I have seen few similar posts related to this but none of them could work for me. can someone give me solution for this?
请不要发布我任何URL的,我已经看到他们:
Please do not post me any URL's, I have already seen them :
<一个href="http://stackoverflow.com/questions/6633748/file-lastmodified-is-never-what-was-set-with-file-setlastmodified">file.lastModified()从来没有什么设置file.setLastModified()
<一个href="http://stackoverflow.com/questions/8169165/is-it-possible-to-reset-the-last-modified-date-of-an-android-file">Is可以重置一个Android文件的最后修改日期?
HTTP:/ /www.mkyong.com/java/how-to-change-the-file-last-modified-date-in-java/
推荐答案
setLastModified()
是在Android 显然是不可靠的,也许是工作在某些设备上,而不是别人。
setLastModified()
is apparently unreliable on Android, perhaps working on some devices and not on others.
这篇关于设置的Android最后修改时间为文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!