Class LibrarySearchPathManager

java.lang.Object
ghidra.app.util.importer.LibrarySearchPathManager

public class LibrarySearchPathManager extends Object
A simple class for managing the library search path and avoiding duplicate directories.
  • Method Details

    • getLibraryPaths

      public static String[] getLibraryPaths()
      Returns an array of library search paths
      Returns:
      an array of library search paths
    • getLibraryFsrlList

      public static List<FSRL> getLibraryFsrlList(ByteProvider provider, MessageLog log, TaskMonitor monitor) throws CancelledException
      Returns a List of FSRLs to search for libraries
      Parameters:
      provider - The ByteProvider of the program being loaded
      log - The log
      monitor - A cancellable monitor
      Returns:
      a List of FSRLs to search for libraries
      Throws:
      CancelledException - if the user cancelled the operation
    • setLibraryPaths

      public static void setLibraryPaths(String[] paths)
      Sets the library search paths to the given array
      Parameters:
      paths - the new library search paths
    • addPath

      public static boolean addPath(String path)
      Adds the specified library search path path to the end of the path search list
      Parameters:
      path - the library search path to add
      Returns:
      true if the path was appended, false if the path was a duplicate
    • reset

      public static void reset()
      Resets the library search path to the default values