private String getOutputMediaPath() {
java.util.Date date = new java.util.Date();
String timeTemp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(date.getTime());
//File storageFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath());
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator +
"VID_" + timeTemp + ".mp4");
Log.e("Error", "getOutputMediaPath file path---"+file.getAbsolutePath());
return file.getAbsolutePath();
}
设置以时间命名的文件路径及名称
精选 转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Python批量复制具有指定名称的文件
本文介绍基于Python语言,读取一个文件夹,并将其中每一个子文件夹内符合名称要求的文件加以筛选,并将筛选得到的文件复制到另一个目标文件夹中的方法~
Python 复制 资源管理器 文件管理 批量操作