Class FileCacheNameIndex

java.lang.Object
ghidra.formats.gfilesystem.FileCacheNameIndex

public class FileCacheNameIndex extends Object
A best-effort cache of MD5 values of files, where the file is identified by its parent's MD5 combined with the file's path inside its parent's 'namespace'.
  • Constructor Details

    • FileCacheNameIndex

      public FileCacheNameIndex()
  • Method Details

    • clear

      public void clear()
    • add

      public void add(String parentMD5, String name, String fileMD5) throws IOException
      Adds a filename mapping to this cache.
      Parameters:
      parentMD5 - the md5 string of the parent object
      name - the name of this object
      fileMD5 - the md5 string of this object
      Throws:
      IOException - if missing or bad md5 values.
    • get

      public String get(String parentMD5, String name) throws IOException
      Retrieves a filename mapping from this cache.
      Parameters:
      parentMD5 - the md5 string of the parent object
      name - the name of the requested object.
      Returns:
      the md5 string of the requested object, or null if not in cache.
      Throws:
      IOException - if missing or bad parent md5 values.