问题
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