public static boolean copyAssetFolder(AssetManager assetManager,
String fromAssetPath, String toPath) {
try {
String[] files = assetManager.list(fromAssetPath);
new File(toPath).mkdirs();
boolean res = true;
for (String file : files)
if (file.contains(".")) {
res &= copyAsset(assetManager,
fromAssetPath + "/" + file,
toPath + "/" + file);
} else {
res &= copyAssetFolder(assetManager,
fromAssetPath + "/" + file,
toPath + "/" + file);
}
return res;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
AssetUtil.java 文件源码
java
阅读 46
收藏 0
点赞 0
评论 0
项目:javaide
作者:
评论列表
文章目录