String pathFileName = “”;
while ((mZipEntry = zipInputStream.getNextEntry()) != null){
//获取到当层名称
pathFileName = mZipEntry.getName();
String currentPathFileName = “”;
//判断是否是文件夹
//*****
//*****
if (mZipEntry.isDirectory()){// 如果是文件夹
pathFileName = pathFileName.substring(0,pathFileName.length() - 1);
//当层文件夹路经
currentPathFileName = outPath + File.separator + pathFileName;
//创建
new File(currentPathFileName).mkdirs();
}else {
//非文件夹直接显示
File file = new File(outPath + “/” + pathFileName);
if (!file.exists()){
file.getParentFile().mkdirs();
file.createNewFile();
}
}
}
}catch (FileNotFoundException e){
e.printStackTrace();
}catch (IOException e){
e.printStackTrace();
}
}
在这个代