Package ghidra.app.util.importer
Class LibrarySearchPathManager
java.lang.Object
ghidra.app.util.importer.LibrarySearchPathManager
A simple class for managing the library search path
and avoiding duplicate directories.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Adds the specified path to the end of the path search list.static boolean
Adds the path at the specified index in path search list.static void
clear()
Clears all paths.static String[]
Returns an array of directories to search for librariesReturns an array of directories to search for librariesstatic boolean
removePath
(String path) Removes the path from the path search list.static void
reset()
Resets the library search path to match the system search paths.static void
restoreLibraryPaths
(String[] paths) Call this to restore paths that were previously persisted.static void
setLibraryPaths
(String[] paths) Sets the directories to search for libraries
-
Constructor Details
-
LibrarySearchPathManager
public LibrarySearchPathManager()
-
-
Method Details
-
getLibraryPaths
Returns an array of directories to search for libraries- Returns:
- an array of directories to search for libraries
-
getLibraryPathsList
Returns an array of directories to search for libraries- Returns:
- a list of directories to search for libraries
-
setLibraryPaths
Sets the directories to search for libraries- Parameters:
paths
- the new library search paths
-
restoreLibraryPaths
Call this to restore paths that were previously persisted. If you really need to change the paths for the entire JVM, then callsetLibraryPaths(String[])
.- Parameters:
paths
- the paths to restore
-
addPath
Adds the specified path to the end of the path search list.- Parameters:
path
- the path to add- Returns:
- true if the path was appended, false if the path was a duplicate
-
addPathAt
Adds the path at the specified index in path search list.- Parameters:
index
- The indexpath
- the path to add- Returns:
- true if the path was appended, false if the path was a duplicate
-
removePath
Removes the path from the path search list.- Parameters:
path
- the path the remove- Returns:
- true if the path was removed, false if the path did not exist
-
reset
public static void reset()Resets the library search path to match the system search paths. -
clear
public static void clear()Clears all paths.
-