Android set last modified time for the file

匿名 (未验证) 提交于 2019-12-03 01:10:02

问题:

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?

Please do not post me any URL's, I have already seen them :

file.lastModified() is never what was set with file.setLastModified()

Is it possible to reset the last modified date of an Android file?

http://www.mkyong.com/java/how-to-change-the-file-last-modified-date-in-java/

回答1:

setLastModified() is apparently unreliable on Android, perhaps working on some devices and not on others.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!