文件
来源:互联网 发布:精雕软件学习 编辑:程序博客网 时间:2024/04/26 17:19
String[] path = edit_path.split("/");
File root = null;
if(path[1].contains("external_sdcard")){
root = Environment.getExternalStorageDirectory_ext();
}else{
root = Environment.getExternalStorageDirectory();
}
File downloadDir = null;
for(int i = 2; i<path.length; i++){
if(i==2){
downloadDir = new File(root, path[2]);
if (!downloadDir.isDirectory() && !downloadDir.mkdirs()) {
Log.e(LOGTAG, "download aborted - can't create picturesDir directory "
+ downloadDir.getPath());
}
}else{
downloadDir = new File(downloadDir, path[i]);
if (!downloadDir.isDirectory() && !downloadDir.mkdirs()) {
Log.e(LOGTAG, "download aborted - can't create picturesDir directory "
+ downloadDir.getPath());
}
}
}
return downloadDir;
File root = null;
if(path[1].contains("external_sdcard")){
root = Environment.getExternalStorageDirectory_ext();
}else{
root = Environment.getExternalStorageDirectory();
}
File downloadDir = null;
for(int i = 2; i<path.length; i++){
if(i==2){
downloadDir = new File(root, path[2]);
if (!downloadDir.isDirectory() && !downloadDir.mkdirs()) {
Log.e(LOGTAG, "download aborted - can't create picturesDir directory "
+ downloadDir.getPath());
}
}else{
downloadDir = new File(downloadDir, path[i]);
if (!downloadDir.isDirectory() && !downloadDir.mkdirs()) {
Log.e(LOGTAG, "download aborted - can't create picturesDir directory "
+ downloadDir.getPath());
}
}
}
return downloadDir;
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 文件
- 关于如何在Google Play Store 购买付费APP
- 批量导入数据触发器处理
- Partitioning and Formatting Second Hard Drive in Linux - (ext3)
- HTML to word
- Notification实现下载进度显示!
- 文件
- 键盘键输入限制
- Linux定时删除过期文件
- 应用程序调用驱动中的write方法失败
- android activity 取消默认启动键盘
- hibernate 日期 时分秒
- Eclipse_中文显示乱码的解决方案
- 在LC3.6上布署lcfiles extension的调试
- Objective-C中的NSObject对象经常使用到的方法