Package ghidra

Class GhidraTestApplicationLayout


public class GhidraTestApplicationLayout extends GhidraApplicationLayout
The Ghidra test application layout defines the customizable elements of the Ghidra application's directory structure when running a test.

This layout exists because tests often need to provide their own user settings directory, rather than using Ghidra's default.

  • Constructor Details

    • GhidraTestApplicationLayout

      public GhidraTestApplicationLayout(File userSettingsDir) throws FileNotFoundException, IOException
      Constructs a new Ghidra application layout object with the provided user settings directory.

      This layout is useful when running Ghidra tests.

      Parameters:
      userSettingsDir - The custom user settings directory to use.
      Throws:
      FileNotFoundException - if there was a problem getting a user directory.
      IOException - if there was a problem getting the application properties.
  • Method Details

    • 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 class GhidraApplicationLayout
      Returns:
      the archive folder, or null if can't be determined
    • findExtensionInstallationDirectories

      protected List<ResourceFile> findExtensionInstallationDirectories()
      Description copied from class: GhidraApplicationLayout
      Returns a prioritized list of directories where Ghidra extensions are installed. These should be at the following locations:
      • [user settings dir]/Extensions
      • [application install dir]/Ghidra/Extensions
      • ghidra/Ghidra/Extensions (development mode)
      Overrides:
      findExtensionInstallationDirectories in class GhidraApplicationLayout
      Returns:
      the install folder, or null if can't be determined
    • findPatchDirectory

      protected ResourceFile findPatchDirectory()
      Description copied from class: GhidraApplicationLayout
      Returns the directory that allows users to add jar and class files to override existing distribution files
      Overrides:
      findPatchDirectory in class GhidraApplicationLayout
      Returns:
      the patch dir; null if not in a distribution