Package io.codemodder

Interface FileCache


public interface FileCache
A cache for file contents. We cache contents because generally memory is cheap and fast. We may want to offer configuration here eventually for situations where the opposite is true.
  • Method Details

    • get

      String get(Path path) throws IOException
      Get the string contents of a file.
      Throws:
      IOException
    • overrideEntry

      void overrideEntry(Path path, String contents)
      Put the string contents of a file into the cache.
    • removeEntry

      void removeEntry(Path resolve)
      Remove the string contents of a file from the cache if it exists.
    • createDefault

      static FileCache createDefault()
    • createDefault

      static FileCache createDefault(int maxSize)