一。创建文件
//获取sd卡路径
public static String SDPATH= Environment.getExternalStorageDirectory()
.getAbsolutePath() + "/";
//创建文件
public void creatSDDir(String dirName){
File file = new file(dirName);
if(!file.exists())
file.mkdir;//创建单一文件夹
file.mkdirs;//创建多个文件夹(例如:/data/pms/database)
}
//创建文件
public void createFile(String fileName)throws IOException {
File file = new File(SDPATH+fileName);
if(!file.exists())
file.createNewFile();
}