创建路径
来源:互联网 发布:嵌入式软件开发实例 编辑:程序博客网 时间:2024/06/06 02:56
import java.io.File;
/**
* 构建路径
* @param stopath
* @return
*/
public static String getPathPath(String stopath){
// path : stopath/planpdf/ym/dd/
DateFormat ym = new SimpleDateFormat("yyyyMM");
DateFormat dd = new SimpleDateFormat("dd");
Date date = new Date();
StringBuffer path = new StringBuffer(stopath);
path.append("planpdf");
File dir1 = new File(path.toString());
if (!dir1.exists()) //判断路径是否存在
dir1.mkdirs();
path.append(File.separator).append(ym.format(date));
File dir2 = new File(path.toString());
if (!dir2.exists())
dir2.mkdirs();
path.append(File.separator).append(dd.format(date)).append(File.separator);
File dir3 = new File(path.toString());
if (!dir3.exists())
dir3.mkdirs();
return path.toString();
}
- 创建路径
- 创建路径
- asp创建文件夹,创建路径
- 创建全路径代码
- 通过路径创建字体
- activiti动态创建路径
- 创建多级路径
- 创建文件路径
- UIBerzierPath类 创建路径
- 创建路径函数
- 创建文件夹,选择路径
- android 创建文件夹路径
- Java 创建文件夹路径
- 创建指定路径文件
- tomcat创建虚拟路径
- C++中创建路径和删除路径
- 根据路径创建文件夹(多级创建)
- 根据路径创建不规则窗体
- ubuntu下的 ps 命令
- Unity3D - 关于Delegate - SignalSlot信息槽的使用和SendMessage取替
- Drawable和Bitmap区别
- JS正则表达式
- Uninstall Advanced SystemCare with WindowsUninstaller.Org Removal Tips
- 创建路径
- python字符串.lower()是干什么的
- 目标检测中背景建模方法
- UIImage imageOrientation
- 什么叫oAuth
- [LeetCode] Edit Distance
- ArcEngine开发之Command控件使用篇
- R语言中的attach()和detach()函数
- 2013第三周上机任务【项目三 长方体类】