SmbFile f = new SmbFile(
"smb://WangZha:Capslock_2014@16.81.225.27/NetIn/");
f.connect(); // 尝试连接
if (!f.isDirectory()) {
return null;
}
SmbFile[] fileList = f.listFiles(new SmbFileFilter() {
@Override
public boolean accept(SmbFile path) throws SmbException {
if (path.isFile() && path.getName().startsWith("PJ16018TQ_")
&& path.getName().endsWith(".json")) {
return true;
}
return false;
}
});