Package ghidra.formats.gfilesystem
Class FileCacheNameIndex
- java.lang.Object
-
- ghidra.formats.gfilesystem.FileCacheNameIndex
-
public class FileCacheNameIndex extends java.lang.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 Summary
Constructors Constructor Description FileCacheNameIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String parentMD5, java.lang.String name, java.lang.String fileMD5)
Adds a filename mapping to this cache.void
clear()
java.lang.String
get(java.lang.String parentMD5, java.lang.String name)
Retrieves a filename mapping from this cache.
-
-
-
Method Detail
-
clear
public void clear()
-
add
public void add(java.lang.String parentMD5, java.lang.String name, java.lang.String fileMD5) throws java.io.IOException
Adds a filename mapping to this cache.- Parameters:
parentMD5
- the md5 string of the parent objectname
- the name of this objectfileMD5
- the md5 string of this object- Throws:
java.io.IOException
- if missing or bad md5 values.
-
get
public java.lang.String get(java.lang.String parentMD5, java.lang.String name) throws java.io.IOException
Retrieves a filename mapping from this cache.- Parameters:
parentMD5
- the md5 string of the parent objectname
- the name of the requested object.- Returns:
- the md5 string of the requested object, or null if not in cache.
- Throws:
java.io.IOException
- if missing or bad parent md5 values.
-
-