对得到的file路径“C:\storage\我的音乐”,以"\"进行分割
2012-10-20 11:31
316 查看
File file = new File("C:/storage/我的音乐"); if(!file.exists()) { file.mkdirs(); } String str = file.getPath(); String[] strs = str.split("\\\\"); for(String s : strs) { System.out.println(s); }
相关文章推荐
- 得到TREEVIEW 中某个节点的路径,以"_"隔开
- <input type="file">定义样式并获取上传文件路径及指定文件类型
- <input type="file" 上传图片不是绝对路径 而是相对路径 怎么解决?
- <jsp:include>和<%@include file=""%>区别
- "一劳永逸"解决web工程路径问题
- &lt;jsp:include page=&quot;&quot;&gt; 与&lt;%@ include file=&quot;&quot;%&gt;
- <jsp:include>和<%@include file=""%> 有什么区别
- <input type="file" name="filePath" />最简单的解决方法
- Flex 调用javascript上传文件读取文件的本地路径的一直是 "C:/fakepath/" 的解决方案
- 清空 input type="file" 里面已经选择的路径
- <Win32 API> 获取系统文件夹路径 GetModuleFileName
- <%@ include file=""%>与<jsp:include page=""/>区别
- 创建路径,以"\" 或者"//"为最后以及目录
- android支持html的<input type="file">标签
- codeblock无法进行调试,没有符号表被读取。请使用 "file" 命令。
- "Unable to get buffer of resource asset file"问题的解决
- <%@ include file=""%>与<jsp:include page=""/>区别
- String.split方法对"."分割的处理
- "File not found""linker command failed with exit code 1" in Xcode 7.2.1
- input type="file" 选取文件路径时出现fakepath问题IE浏览器解决办法