public boolean isFile(String directory) {
boolean isDirExistFlag = false;
File file = new File(directory);
try {
if (file.exists()) {
isDirExistFlag = true;
}
} catch (Exception e) {
}
return isDirExistFlag;
}
if (isFile(文件绝对目录+文件名)) {
文件存在
}
网友评论