Package ghidra

Class GhidraApplicationLayout

    • Constructor Detail

      • GhidraApplicationLayout

        public GhidraApplicationLayout()
                                throws java.io.FileNotFoundException,
                                       java.io.IOException
        Constructs a new Ghidra 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.
      • GhidraApplicationLayout

        public GhidraApplicationLayout​(java.io.File applicationInstallationDir)
                                throws java.io.FileNotFoundException,
                                       java.io.IOException
        Constructs a new Ghidra application layout object using a provided application installation directory instead of this layout's default.

        This is used when something external to Ghidra needs Ghidra's layout (like the Eclipse GhidraDevPlugin).

        Parameters:
        applicationInstallationDir - The application installation directory.
        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.
    • Method Detail

      • findGhidraApplicationRootDirs

        protected java.util.Collection<ResourceFile> findGhidraApplicationRootDirs()
        Finds the application root directories for this application layout.
        Returns:
        A collection of the application root directories for this layout.
      • findGhidraApplicationInstallationDir

        protected ResourceFile findGhidraApplicationInstallationDir()
        Finds the application installation directory for this Ghidra application layout.
        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
        Finds the modules for this Ghidra application layout.
        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()
        Returns the directory where all Ghidra extension archives are stored. This should be at the following location:
        • [application root]/Extensions/Ghidra
        Returns:
        the archive folder, or null if can't be determined
      • findExtensionInstallationDirectory

        protected ResourceFile findExtensionInstallationDirectory()
        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)
        Returns:
        the install folder, or null if can't be determined