文件名fileName的处理总结

org.apache.commons.io.FilenameUtils 已经提供了对FileName的封装。比如获取一个文件路径:

System.out.println(FilenameUtils.getPath("/home/admin/test.log.1"));

 输出:home/admin/

猜你喜欢

转载自san-yun.iteye.com/blog/1987721
今日推荐