def set_hooks
      # Final splat var captures any other variables we are not interested in,
      # and avoids them being squashed into the final var.
      eigen_capture(File, [:open, :new], @flag) do |klazz, path, mode, *other|
        add_path(path) if klazz == File && mode =~ /^(t|b)?((w|a)[+]?)(t|b)?$/
      end

      eigen_capture(File, [:rename, :symlink, :link], @flag) do |klazz, old, new, *other|
        add_path(new)
      end

      eigen_capture(Dir, :mkdir, @flag) do |klazz, path, *other|
        add_path(root_dir(path))
      end
    end
def set_hooks
      # Final splat var captures any other variables we are not interested in,
      # and avoids them being squashed into the final var.
      eigen_capture(File, [:open, :new], @flag) do |klazz, path, mode, *other|
        add_path(path) if klazz == File && mode =~ /^(t|b)?((w|a)[+]?)(t|b)?$/
      end

      eigen_capture(File, [:rename, :symlink, :link], @flag) do |klazz, old, new, *other|
        add_path(new)
      end

      eigen_capture(Dir, :mkdir, @flag) do |klazz, path, *other|
        add_path(root_dir(path))
      end
    end
Hooks to capture any standard file, link or directory creation. Other
 methods (e.g. FileUtils#mkdir_p, FileUtils#move), ultimately bottom out
 into these primitive functions.