Class FileAttributesReader

java.lang.Object
cool.scx.io.file.FileAttributesReader

public class FileAttributesReader extends Object
通过 FileWatcher 主动更新 代替高频的 Files.readAttributes 查询
Version:
0.0.1
Author:
scx567888
  • Constructor Details

  • Method Details

    • get

      public BasicFileAttributes get(Path path) throws IOException
      这里为了性能考虑并没有在 方法内部判断 但是请保证 参数 path 一定是 target 的子目录或者子文件 否则将无法正确判断文件变化
      Parameters:
      path - path
      Returns:
      文件内容 (可能为 null )
      Throws:
      IOException - a