Package ghidra.formats.gfilesystem
Class FSRLRoot
java.lang.Object
ghidra.formats.gfilesystem.FSRL
ghidra.formats.gfilesystem.FSRLRoot
A type of
FSRL
that is specific to the filesystem's identity.
A FSRL's parent is always a FSRLRoot.
A FSRLRoot's parent is always a FSRL (ie. the container the filesystem data is in), or null.
Examples of relationship between FSRL and FSRLRoots:
- FSRLRoot [ file:// ]
"file://" - FSRLRoot [ file:// ] <---- FSRL [ /filename.txt ]
"file:///filename.txt" - FSRLRoot [ file:// ] <---- FSRL [ /filename.txt ] <--- FSRLRoot [ subfs:// ]
"file:///filename.txt|subfs://"
-
Field Summary
Fields inherited from class ghidra.formats.gfilesystem.FSRL
FSRL_OPTION_NAME, PARAM_MD5, parent, path
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendToStringBuilder
(StringBuilder sb, boolean recurse, boolean includeParams, boolean includeFSRoot) Returns the parent containerfile FSRL, or null if this FSRLRoot specifies a root-level filesystem.getFS()
Returns theFSRLRoot
object that represents the entirefilesystem
for this FSRL.getName()
Always returns null for a FSRLRoot.getPath()
Always returns null for a FSRLRoot.Returns the "protocol" portion of this FSRLRoot, for example, in a FSRLRoot of "file://", this method would return "file".boolean
Returns true if there is a parent containerfile, or false if this FSRLRoot specifies a root-level filesystem.int
hashCode()
static FSRLRoot
Creates aFSRLRoot
without a parent container, using the suppliedprotocol
string as its type.static FSRLRoot
Create a copy ofcopyFSRL
, but using a differentcontainerFile
parent.static FSRLRoot
withPathMD5
(String newPath, String newMD5) Methods inherited from class ghidra.formats.gfilesystem.FSRL
appendPath, convertRootToContainer, equals, fromProgram, fromString, fromString, getMD5, getName, getNestingDepth, isDescendantOf, isEquivalent, isEquivalent, isMD5Equal, makeNested, split, toPrettyFullpathString, toPrettyString, toString, toStringPart, withMD5, withPath, withPath, writeToProgramInfo
-
Method Details
-
makeRoot
Creates aFSRLRoot
without a parent container, using the suppliedprotocol
string as its type.- Parameters:
protocol
- string protocol name- Returns:
- new
FSRLRoot
instance.
-
nestedFS
-
nestedFS
Create a copy ofcopyFSRL
, but using a differentcontainerFile
parent.(ie. re-parents copyFSRL so its parent is containerFile)
-
getFS
Description copied from class:FSRL
Returns theFSRLRoot
object that represents the entirefilesystem
for this FSRL.Never returns NULL, and calling getFS() on a
FSRLRoot
object returns itself. -
getProtocol
Returns the "protocol" portion of this FSRLRoot, for example, in a FSRLRoot of "file://", this method would return "file".- Returns:
- string protocol / filesystem type.
-
getContainer
Returns the parent containerfile FSRL, or null if this FSRLRoot specifies a root-level filesystem.- Returns:
FSRL
of the container object that this filesystem is nested under.
-
hasContainer
public boolean hasContainer()Returns true if there is a parent containerfile, or false if this FSRLRoot specifies a root-level filesystem.- Returns:
- boolean true if this
FSRLRoot
has a parent container, or false if not.
-
getPath
Always returns null for a FSRLRoot. -
getName
Always returns null for a FSRLRoot. -
withPathMD5
-
appendToStringBuilder
protected void appendToStringBuilder(StringBuilder sb, boolean recurse, boolean includeParams, boolean includeFSRoot) - Overrides:
appendToStringBuilder
in classFSRL
-
hashCode
public int hashCode()
-