首页 > 其他 > 详细

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

时间:2015-12-10 16:38:23      阅读:264      评论:0      收藏:0      [点我收藏+]
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;
    }
}

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

原文:http://www.cnblogs.com/520-1314/p/5036094.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!