Package ghidra
Class GhidraJarApplicationLayout
- java.lang.Object
-
- utility.application.ApplicationLayout
-
- ghidra.GhidraApplicationLayout
-
- ghidra.GhidraJarApplicationLayout
-
public class GhidraJarApplicationLayout extends GhidraApplicationLayout
The Ghidra jar application layout defines the customizable elements of the Ghidra application's directory structure when running in "single jar mode."
-
-
Field Summary
-
Fields inherited from class utility.application.ApplicationLayout
applicationInstallationDir, applicationProperties, applicationRootDirs, extensionArchiveDir, extensionInstallationDir, modules, userCacheDir, userSettingsDir, userTempDir
-
-
Constructor Summary
Constructors Constructor Description GhidraJarApplicationLayout()
Constructs a new Ghidra jar application layout object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResourceFile
findExtensionArchiveDirectory()
Returns the directory where all Ghidra extension archives are stored.protected ResourceFile
findExtensionInstallationDirectory()
Returns the directory where all Ghidra extension archives should be installed.protected ResourceFile
findGhidraApplicationInstallationDir()
Finds the application installation directory for this Ghidra application layout.protected java.util.Collection<ResourceFile>
findGhidraApplicationRootDirs()
Finds the application root directories for this application layout.protected java.util.Map<java.lang.String,GModule>
findGhidraModules()
Finds the modules for this Ghidra application layout.boolean
inSingleJarMode()
Checks whether or not the application is using a "single jar" layout.-
Methods inherited from class utility.application.ApplicationLayout
createUserDirs, getApplicationInstallationDir, getApplicationProperties, getApplicationRootDirs, getExtensionArchiveDir, getExtensionInstallationDir, getModules, getUserCacheDir, getUserSettingsDir, getUserTempDir
-
-
-
-
Constructor Detail
-
GhidraJarApplicationLayout
public GhidraJarApplicationLayout() throws java.io.FileNotFoundException, java.io.IOException
Constructs a new Ghidra jar application layout object.- Throws:
java.io.FileNotFoundException
- if there was a problem getting a user directory.java.io.IOException
- if there was a problem getting the application properties or modules.
-
-
Method Detail
-
inSingleJarMode
public boolean inSingleJarMode()
Description copied from class:ApplicationLayout
Checks whether or not the application is using a "single jar" layout. Custom application layouts that extend this class can override this method once they determine they are in single jar mode.- Overrides:
inSingleJarMode
in classApplicationLayout
- Returns:
- true if the application is using a "single jar" layout; otherwise, false.
-
findGhidraApplicationRootDirs
protected java.util.Collection<ResourceFile> findGhidraApplicationRootDirs()
Description copied from class:GhidraApplicationLayout
Finds the application root directories for this application layout.- Overrides:
findGhidraApplicationRootDirs
in classGhidraApplicationLayout
- Returns:
- A collection of the application root directories for this layout.
-
findGhidraApplicationInstallationDir
protected ResourceFile findGhidraApplicationInstallationDir()
Description copied from class:GhidraApplicationLayout
Finds the application installation directory for this Ghidra application layout.- Overrides:
findGhidraApplicationInstallationDir
in classGhidraApplicationLayout
- Returns:
- The application installation directory for this Ghidra application layout. Could be null if there is no application installation directory.
-
findGhidraModules
protected java.util.Map<java.lang.String,GModule> findGhidraModules() throws java.io.IOException
Description copied from class:GhidraApplicationLayout
Finds the modules for this Ghidra application layout.- Overrides:
findGhidraModules
in classGhidraApplicationLayout
- Returns:
- The modules for this Ghidra application layout.
- Throws:
java.io.IOException
- if there was a problem finding the modules on disk.
-
findExtensionArchiveDirectory
protected ResourceFile findExtensionArchiveDirectory()
Description copied from class:GhidraApplicationLayout
Returns the directory where all Ghidra extension archives are stored. This should be at the following location:
[application root]/Extensions/Ghidra
- Overrides:
findExtensionArchiveDirectory
in classGhidraApplicationLayout
- Returns:
- the archive folder, or null if can't be determined
-
findExtensionInstallationDirectory
protected ResourceFile findExtensionInstallationDirectory()
Description copied from class:GhidraApplicationLayout
Returns the directory where all Ghidra extension archives should be installed. This should be at the following location:
[application install dir]/Ghidra/Extensions
ghidra/Ghidra/Extensions
(development mode)
- Overrides:
findExtensionInstallationDirectory
in classGhidraApplicationLayout
- Returns:
- the install folder, or null if can't be determined
-
-