2017年2月16日

java获取web项目根路径

摘要: //获取web 项目根路径 public static String getWebPath() { String sysPath = ""; try { //SfgkUtil 为该方法所在类名称 if(SfgkUtil.class.getClassLoader().getResource(File. 阅读全文

posted @ 2017-02-16 21:36 nycqw 阅读(247) 评论(0) 推荐(0)

File 类常用操作

摘要: File 类只能用来记录文件信息,不能对文件的内容进行访问。 1、创建文件[夹]引用 1)文件夹 File folder = new File("C:\\one\\two"); File subFolder = new File(folder, "\\three"); 2)文件 File file1 阅读全文

posted @ 2017-02-16 21:22 nycqw 阅读(133) 评论(0) 推荐(0)

导航