File file = new File("C:/storage/我的音乐");
if(!file.exists()) {
file.mkdirs();
}
String str = file.getPath();
String[] strs = str.split("\\\\");
for(String s : strs) {
System.out.println(s);
}
对得到的file路径“C:\storage\我的音乐”,以"\"进行分割
最新推荐文章于 2024-03-23 21:45:31 发布