/**
* 判断路径是否存在
*
* @param path 需要判断的路径
* @return true 是存在,false 是不存在
*/
public static boolean isPathExist(String path) {
File file = new File(path);
if (file.exists()) {
return true;
}
return false;
}
android 判断路径是否存在
于 2019-09-06 09:32:52 首次发布
本文介绍了一个简单的Java方法,用于检查指定路径是否存在于文件系统中。通过创建File对象并调用exists()方法,可以轻松实现这一功能。
3091

被折叠的 条评论
为什么被折叠?



