文件,图片,视频的保存路径
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; } }
相关文章推荐
- 机器学习概念整理
- adb -- 检测手机端是否安装某个应用程序
- [Javascript] Ajax
- 常用DOS命令(三)--RD命令
- 使用DrRacket进行SICP程序的编写
- 括号内标点的用法
- MAVEN实战学习(1)—前言以及前期环境准备
- 信息安全与密码学2-什么是数字签名
- 存储过程语法
- 根据进程名字获取id并kill
- 存储过程语法
- express实现前后端通信上传图片,存储数据库(mysql)傻瓜教程(三)完结篇
- SpringMVC配置XML
- 常见Android OOM异常
- Fixing the "A fatal error occurred while trying to sysprep the machine" error
- 登录验证码图片生成
- Windows MongoDB:搭建三节点 Replica Set 环境
- Android BlueDroid(三):BlueDroid蓝牙开启过程enable
- JAVA的API: Object类
- ios 虚化