File path = new File("/sdcard/okc"); File file = new File("/sdcard/okc/save.txt"); if (!path.exists()){ path.mkdirs(); } if (!file.exists()){ file.createNewFile(); }
File目录和file文件的创建,布布扣,bubuko.com
原文:http://www.cnblogs.com/tiejiangweigaibianercunzai/p/3901822.html