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 voidappendToStringBuilder(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 theFSRLRootobject that represents the entirefilesystemfor 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".booleanReturns true if there is a parent containerfile, or false if this FSRLRoot specifies a root-level filesystem.inthashCode()static FSRLRootCreates aFSRLRootwithout a parent container, using the suppliedprotocolstring as its type.static FSRLRootCreate a copy ofcopyFSRL, but using a differentcontainerFileparent.static FSRLRootwithPathMD5(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 aFSRLRootwithout a parent container, using the suppliedprotocolstring as its type.- Parameters:
protocol- string protocol name- Returns:
- new
FSRLRootinstance.
-
nestedFS
-
nestedFS
Create a copy ofcopyFSRL, but using a differentcontainerFileparent.(ie. re-parents copyFSRL so its parent is containerFile)
-
getFS
Description copied from class:FSRLReturns theFSRLRootobject that represents the entirefilesystemfor this FSRL.Never returns NULL, and calling getFS() on a
FSRLRootobject 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:
FSRLof 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
FSRLRoothas 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:
appendToStringBuilderin classFSRL
-
hashCode
public int hashCode()
-