您的位置:首页 > 其它

文件,图片,视频的保存路径

2015-12-10 15:02 465 查看
public class PathManager {
//自定义相机存储路径(图片经过剪裁后的图片,生成640*640)
public static File getCropPhotoPath() {
File photoFile = new File(getCropPhotoDir(),System.currentTimeMillis() + ".jpg");
return photoFile;
}

//存储剪裁后的图片的文件夹
public static File getCropPhotoDir() {
String path = Environment.getExternalStorageDirectory()
+ "/etourypic";
File file = new File(path);
if (!file.exists()) {
file.mkdirs();
}
return file;
}
//存储拍照完成的页面
public static File getVideoPath(){
File videoFile = new File(getVideoDir(),System.currentTimeMillis() + ".3gp");
return videoFile;
}
public static File getVideoDir() {
String path = Environment.getExternalStorageDirectory()
+ "/etouryvideo";
File file = new File(path);
if (!file.exists()) {
file.mkdirs();
}
return file;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: