/**
* 判断文件夹是否存在
* @param p_strPath
* @return
*/
public static boolean existsDirectory(String p_strPath) {
try {
File file = new File(p_strPath);
if (file.isDirectory() && file.exists()) {
return true;
}
}
catch (Exception e) {
}
return false;
} /**
* 判断文件夹是否存在
* @param p_strPath
* @return
*/
public static boolean existsFile(String p_strFileName) {
try {
File file = new File(p_strFileName);
if (file.isFile() && file.exists()) {
return true;
}
}
catch (Exception e) {
}
return false;
}
* 判断文件夹是否存在
* @param p_strPath
* @return
*/
public static boolean existsDirectory(String p_strPath) {
try {
File file = new File(p_strPath);
if (file.isDirectory() && file.exists()) {
return true;
}
}
catch (Exception e) {
}
return false;
} /**
* 判断文件夹是否存在
* @param p_strPath
* @return
*/
public static boolean existsFile(String p_strFileName) {
try {
File file = new File(p_strFileName);
if (file.isFile() && file.exists()) {
return true;
}
}
catch (Exception e) {
}
return false;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货