Package ghidra.app.util.importer

# 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 Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `addPath(String path)`
  Adds the specified library search path `path` to the end of the path search list
  `static List<FSRL>`
  `getLibraryFsrlList(Program program, MessageLog log, TaskMonitor monitor)`
  Returns a `List` of `FSRL`s to search for libraries
  `static String[]`
  `getLibraryPaths()`
  Returns an array of library search paths
  `static void`
  `reset()`
  Resets the library search path to the default values
  `static void`
  `setLibraryPaths(String[] paths)`
  Sets the library search paths to the given array

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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(Program program, MessageLog log, TaskMonitor monitor) throws CancelledException
    Returns a `List` of `FSRL`s to search for libraries
    Parameters:
      `program` - The `Program` being loaded
      `log` - The log
      `monitor` - A cancellable monitor
    Returns:
      a `List` of `FSRL`s 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