📅  最后修改于: 2022-03-11 14:52:30.113000             🧑  作者: Mango
String path = "C:" + File.separator + "hello" + File.separator + "hi.txt";
// Use relative path for Unix systems
File f = new File(path);
f.getParentFile().mkdirs();
f.createNewFile();