apache.commons.io 学习

Commons IO is a library of utilities to assist with developing IO functionality.

There are six main areas included:

  • Utility classes - with static methods to perform common tasks
  • Input - useful Input Stream and Reader implementations
  • Output - useful Output Stream and Writer implementations
  • Filters - various implementations of file filters
  • Comparators - various implementations of java.util.Comparator for files
  • File Monitor - a component for monitoring file system events

 

org.apache.commons.io.FileSystemUtils


FileSystemUtils 可以获得指定磁盘路径的可用空间

 

org.apache.commons.io.FileUtil

FileUtils.readLines ( file,  "UTF-8" ) ;

FileUtils.writeStringToFile(file, name); 文本写入指定文件

FileUtils.copyURLToFile(url, file);  网络流保存为文件

FileUtils.sizeOfDirectory(dir);  目录大小

FileUtils.getTempDirectoryPath();获得临时文件夹路径

FileUtils.touch(f); 把文件的修改时间修改成当前时刻

 

org.apache.commons.io.
monitor

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(apache,F#)