System.out.println(System.getProperty("user.dir"));
File directory = new File("");//设定为当前文件夹
System.out.println(directory.getCanonicalPath());//获取标准的路径
System.out.println(directory.getAbsolutePath());//获取绝对路径
2022-11-20 09:00:16
System.out.println(System.getProperty("user.dir"));
File directory = new File("");//设定为当前文件夹
System.out.println(directory.getCanonicalPath());//获取标准的路径
System.out.println(directory.getAbsolutePath());//获取绝对路径
下一篇:c#拷贝目录下所有文件