private boolean checkFileName(downFileName) { try { ftp.cd(downFileName); //不是目录时,将报错 ftp.cd(".."); // 回到原来的目录 return true; }catch(Exception e) { return false; }}