最佳答案
使用时
file.createNewFile();
我得到了下面的例外
java.io.IOException: Parent directory of file does not exist: /.../pkg/databases/mydb
我想知道是否有一个 createNewFile 来创建缺少的父目录?