Package ghidra.formats.gfilesystem
Interface GFileSystemProgramProvider
public interface GFileSystemProgramProvider
GFileSystem add-on interface that allows a filesystem publish the fact that
it supports an import feature allowing the caller to import binaries directly into
Ghidra without going through a Loader.-
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvideProgram(GFile file) Returns true if this GFileSystem can convert the specified GFile instance into a Ghidra Program.getProgram(GFile file, LanguageService languageService, TaskMonitor monitor, Object consumer) NOTE: ONLY OVERRIDE THIS METHOD IF YOU CANNOT PROVIDE AN INPUT STREAM TO THE INTERNAL FILES OF THIS FILE SYSTEM!
BE SURE TO REGISTER THE GIVEN CONSUMER ON THE PROGRAM.
-
Method Details
-
getProgram
Program getProgram(GFile file, LanguageService languageService, TaskMonitor monitor, Object consumer) throws Exception NOTE: ONLY OVERRIDE THIS METHOD IF YOU CANNOT PROVIDE AN INPUT STREAM TO THE INTERNAL FILES OF THIS FILE SYSTEM!
BE SURE TO REGISTER THE GIVEN CONSUMER ON THE PROGRAM.
Returns a program for the given file.- Parameters:
file- the file to convert into a programlanguageService- the language service for locating languages and compiler specificationsmonitor- a task monitorconsumer- the consumer for the program to be returned- Returns:
- a program for the given file
- Throws:
Exception- if errors occur
-
canProvideProgram
Returns true if this GFileSystem can convert the specified GFile instance into a Ghidra Program.- Parameters:
file- GFile file or directory instance.- Returns:
- boolean true if calls to
getProgram(GFile, LanguageService, TaskMonitor, Object)will be able to convert the file into a program.
-