From 66f48fe95b8403e90df16e368e8dbb7dc0cb4137 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Mon, 7 Jul 2025 06:45:18 -0400 Subject: [PATCH] GP-5545_5600: ProgramLoader.Builder can now take a string-based source --- .../java/ghidra/app/util/importer/ProgramLoader.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/importer/ProgramLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/importer/ProgramLoader.java index 37ffb164d3..9506bf5a8f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/importer/ProgramLoader.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/importer/ProgramLoader.java @@ -146,6 +146,18 @@ public class ProgramLoader { return this; } + /** + * Sets the required import source to the given filesystem path + *

+ * NOTE: Any previously defined sources will be overwritten + * + * @param path The filesystem path to import. A {@code null} value will unset the source. + * @return This {@link Builder} + */ + public Builder source(String path) { + return source(new File(path)); + } + /** * Sets the {@link Project}. Loaders can use this to take advantage of existing * {@link DomainFolder}s and {@link DomainFile}s to do custom behaviors such as loading