public class Test {
public static void main(String[] args) {
String strPath = "C://1/2/a/b/c/";
mkdir(strPath);
}
static String mkdir(String filePath) {
File file = new File(filePath);
System.out.println("file:" + file.getAbsolutePath());
if (!file.isDirectory()) {
new File(mkdir(file.getParent())).mkdir();
}
file.mkdir();
return filePath;
}
}
创建一个多级文件目录
原创海太帅 ©著作权
文章标签 创建一个多级文件目录 文章分类 移动开发
上一篇:Android--sharepreference总结
下一篇: IllegalStateException: Can not perform this action after onSaveInstanceState:
-
Vue3 创建一个应用
Vue3 创建一个应用
vite vue -
手写一个拖拽文件功能
手写一个拖拽文件功能
Nodejs JavaScript -
location 将多级目录下的文件转成一个文件
/ck-135-201-7142. 指向/ck/135/201/7142.
location nginx html #if
















