not valid lastModified from smbfile of JCIFS library

此生再无相见时 提交于 2019-12-11 17:54:15

问题


I suspect that there is a bug in smbfile of JCIFS library as I get only "Thu Jan 01 08:00:00 GMT+08:00 1970" for any dates from getLastModified(); lastModified(); when I do a window share to android device. I am looping through the exist files and is able to do file copy operation, so mis-spelling of file name or path is not possible. I want to get one of the filedate of MS Window file , no matter it is the creation date, lastmodified date or accessed date.

filedatetime = mWindowFile.getLastModified();
mToAndroidFile.setLastModified(filedatetime);

回答1:


After testing against 2 phones: rooted android with 4.2.2. setLastModified always return false, another android with 7.1.2, setLastModified works . so whether setLastModified works or not, it depends. Always tested the returned value!



来源:https://stackoverflow.com/questions/52751083/not-valid-lastmodified-from-smbfile-of-jcifs-library

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