Smbfile获取java中的上次访问日期
我正在使用共享文件。我正在使用jcifs.jar库获取共享文件的列表Smbfile获取java中的上次访问日期,java,file,io,Java,File,Io,我正在使用共享文件。我正在使用jcifs.jar库获取共享文件的列表 NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication(host, username, password); SmbFile rootFile = new SmbFile(fullPath, authentication); SmbFile[] listFiles = root.listFiles(); for (int i =
NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication(host, username, password);
SmbFile rootFile = new SmbFile(fullPath, authentication);
SmbFile[] listFiles = root.listFiles();
for (int i = 0, i< listFiles.length; i++) {
SmbFile sf = listFiles[i];
//I need to get last accessed date of each sf file.
}
没有用于检查上次访问的嵌入方法。最近的方法是最后修改的:
getDate
public long getDate()
This URLConnection method just returns the result of lastModified.
Overrides:
getDate in class java.net.URLConnection
Returns:
the last modified data as milliseconds since Jan 1, 1970
你可以看看谷歌添加了这个功能的版本
getDate
public long getDate()
This URLConnection method just returns the result of lastModified.
Overrides:
getDate in class java.net.URLConnection
Returns:
the last modified data as milliseconds since Jan 1, 1970