Package ghidra.plugins.fsbrowser

# Class FileSystemBrowserPlugin

java.lang.Object
ghidra.framework.plugintool.Plugin
ghidra.plugins.fsbrowser.FileSystemBrowserPlugin

All Implemented Interfaces:
  `FileSystemBrowserService`, `ApplicationLevelPlugin`, `ProjectListener`, `PluginEventListener`, `ServiceListener`, `ExtensionPoint`

public class FileSystemBrowserPlugin extends Plugin implements ApplicationLevelPlugin, ProjectListener, FileSystemBrowserService
A `Plugin` that supplies a `filesystem` browser component that allows the user to view the contents of filesystems and perform actions on the files inside those filesystems.

- ## Field Summary

  ### Fields inherited from class ghidra.framework.plugintool.Plugin

  `name, pluginDescription, tool`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileSystemBrowserPlugin(PluginTool tool)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `createNewFileSystemBrowser(FileSystemRef fsRef, GFile rootDir, boolean show)`
  Creates a new browser UI component for an already open `GFileSystem` (pinned with the specified `FileSystemRef` that will be taken ownership of by this method).
  `protected void`
  `dispose()`
  Tells a plugin that it is no longer needed.
  `List<FSRL>`
  `getCurrentlyOpenBrowsers()`
  `File`
  `getLastExportDirectory()`
  `FSBComponentProvider`
  `getProviderFor(FSRL fsrl)`
  Returns an already opened provider for the specified FSRL.
  `protected void`
  `init()`
  Initialization method; override to add initialization for this plugin.
  `void`
  `openFileSystem()`
  Prompts the user to pick a file system container file to open using a local filesystem browser and then displays that filesystem in a new fsb browser.
  `void`
  `openFileSystem(FSRL fsrl)`
  Opens the given `FSRL` in a file system browser.
  `void`
  `processEvent(PluginEvent event)`
  Method called to process a plugin event.
  `void`
  `projectClosed(Project project)`
  Notification that the given project is closed.
  `void`
  `projectOpened(Project project)`
  Notification that the given project is open.
  `void`
  `setLastExportDirectory(File lastExportDirectory)`
  `void`
  `showProvider(FSBComponentProvider provider)`

  ### Methods inherited from class ghidra.framework.plugintool.Plugin

  `accept, acceptData, canClose, canCloseDomainObject, cleanup, close, dataStateRestoreCompleted, dependsUpon, deregisterService, equals, eventSent, firePluginEvent, getData, getMissingRequiredServices, getName, getPluginDescription, getServicesRequired, getSupportedDataTypes, getTool, getTransientState, getUndoRedoState, hashCode, hasMissingRequiredService, hasUnsaveData, internalRegisterEventConsumed, isDisposed, prepareToSave, readConfigState, readDataState, registerDynamicServiceProvided, registerServiceProvided, restoreTransientState, restoreUndoRedoState, saveData, serviceAdded, serviceRemoved, writeConfigState, writeDataState`

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

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

- ## Constructor Details

  - ### FileSystemBrowserPlugin

    public FileSystemBrowserPlugin(PluginTool tool)

- ## Method Details

  - ### init

    protected void init()
    Description copied from class: `Plugin`
    Initialization method; override to add initialization for this plugin. This is where a plugin should acquire its services. When this method is called, all plugins have been instantiated in the tool.
    Overrides:
      `init` in class `Plugin`

  - ### dispose

    protected void dispose()
    Description copied from class: `Plugin`
    Tells a plugin that it is no longer needed. The plugin should release any resources that it has. All actions, components, services will automatically be cleaned up.
    Overrides:
      `dispose` in class `Plugin`

  - ### openFileSystem

    public void openFileSystem(FSRL fsrl)
    Description copied from interface: `FileSystemBrowserService`
    Opens the given `FSRL` in a file system browser.
    Specified by:
      `openFileSystem` in interface `FileSystemBrowserService`
    Parameters:
      `fsrl` - The thing to open in a file system browser.

  - ### createNewFileSystemBrowser

    public void createNewFileSystemBrowser(FileSystemRef fsRef, GFile rootDir, boolean show)
    Creates a new browser UI component for an already open `GFileSystem` (pinned with the specified `FileSystemRef` that will be taken ownership of by this method).
    Parameters:
      `fsRef` - `FileSystemRef` of open `GFileSystem`
      `rootDir` - directory to use as the root of the filesystem's tree, or `null` to specify the filesystem's actual rootdir
      `show` - boolean true if the new browser component should be shown

  - ### showProvider

    public void showProvider(FSBComponentProvider provider)

  - ### openFileSystem

    public void openFileSystem()
    Prompts the user to pick a file system container file to open using a local filesystem browser and then displays that filesystem in a new fsb browser.

  - ### getProviderFor

    public FSBComponentProvider getProviderFor(FSRL fsrl)
    Returns an already opened provider for the specified FSRL.
    Parameters:
      `fsrl` - `FSRL` of root dir of browser component to fetch.
    Returns:
      provider or null if not found.

  - ### getCurrentlyOpenBrowsers

    public List<FSRL> getCurrentlyOpenBrowsers()

  - ### processEvent

    public void processEvent(PluginEvent event)
    Description copied from class: `Plugin`
    Method called to process a plugin event. Plugins should override this method if the plugin processes PluginEvents;
    Overrides:
      `processEvent` in class `Plugin`
    Parameters:
      `event` - plugin to process

  - ### projectClosed

    public void projectClosed(Project project)
    Description copied from interface: `ProjectListener`
    Notification that the given project is closed.
    Specified by:
      `projectClosed` in interface `ProjectListener`
    Parameters:
      `project` - project that is closed

  - ### projectOpened

    public void projectOpened(Project project)
    Description copied from interface: `ProjectListener`
    Notification that the given project is open.
    Specified by:
      `projectOpened` in interface `ProjectListener`
    Parameters:
      `project` - project that is opened

  - ### getLastExportDirectory

    public File getLastExportDirectory()

  - ### setLastExportDirectory

    public void setLastExportDirectory(File lastExportDirectory)