无效,来自JCIFS库的smbfile中的lastModified [英] not valid lastModified from smbfile of JCIFS library

查看:204
本文介绍了无效,来自JCIFS库的smbfile中的lastModified的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怀疑JCIFS库的smbfile中存在错误,因为我只得到了 getLastModified()中的任何日期均为"Thu Jan 01 08:00:00 GMT + 08:00 1970";最后修改(); 当我向Android设备共享窗口时. 我正在遍历现有文件,并且能够执行文件复制操作,因此不可能对文件名或路径进行拼写错误. 我想获取MS Window文件的filedate之一,无论是创建日期,最后修改日期还是访问日期.

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);

推荐答案

针对2部手机进行测试后:以4.2.2植根于android. setLastModified总是返回false,另一个Android带有7.1.2的setLastModified作品.因此,setLastModified是否有效取决于它.始终测试返回的值!

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!

这篇关于无效,来自JCIFS库的smbfile中的lastModified的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆