Class GhidraFile

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      ChangeModifier and Type Method Description
      void addToVersionControl​(java.lang.String comment, boolean keepCheckedOut, TaskMonitor monitor)
      Adds this private file to version control.
      boolean canAddToRepository()
      Returns true if this private file may be added to the associated repository.
      boolean canCheckin()
      Returns true if this file may be checked-in to the associated repository.
      boolean canCheckout()
      Returns true if this file may be checked-out from the associated repository.
      boolean canMerge()
      Returns true if this file can be merged with the current versioned file.
      boolean canRecover()
      Prior to invoking getDomainObject, this method can be used to determine if unsaved changes can be recovered on the next open.
      boolean canSave()
      Return whether this domain object can be saved (i.e., updated/overwritten).
      void checkin​(CheckinHandler checkinHandler, boolean okToUpgrade, TaskMonitor monitor)
      Performs check in to associated repository.
      boolean checkout​(boolean exclusive, TaskMonitor monitor)
      Checkout this file for update.
      int compareTo​(DomainFile df)  
      DomainFile copyTo​(DomainFolder newParent, TaskMonitor monitor)
      Copy this file into the newParent folder as a private file.
      DomainFile copyVersionTo​(int version, DomainFolder destFolder, TaskMonitor monitor)
      Copy a specific version of this file to the specified destFolder.
      void delete()
      Delete the entire database for this file, including any version files.
      void delete​(int version)
      Deletes a specific version of a file from the versioned filesystem.
      boolean equals​(java.lang.Object obj)  
      boolean exists()
      Check for existence of domain file.
      ChangeSet getChangesByOthersSinceCheckout()
      Returns changes made to versioned file by others since checkout was performed.
      ItemCheckoutStatus[] getCheckouts()
      Get a list of checkouts by all users for the associated versioned file.
      ItemCheckoutStatus getCheckoutStatus()
      Get checkout status associated with a versioned file.
      java.util.ArrayList<?> getConsumers()
      Get the list of consumers (Objects) for this domain file.
      java.lang.String getContentType()
      Returns content-type string
      DomainObject getDomainObject​(java.lang.Object consumer, boolean okToUpgrade, boolean okToRecover, TaskMonitor monitor)
      Opens and returns the current domain object.
      java.lang.Class<? extends DomainObject> getDomainObjectClass()
      Returns the underlying Class for the domain object in this domain file.
      java.lang.String getFileID()
      Returns a unique file-ID
      javax.swing.Icon getIcon​(boolean disabled)
      Get the state based Icon image for the domain file based upon its content class.
      DomainObject getImmutableDomainObject​(java.lang.Object consumer, int version, TaskMonitor monitor)
      Returns a new DomainObject that cannot be changed or saved to its original file.
      long getLastModifiedTime()
      Get a long value representing the time when the data was last modified.
      int getLatestVersion()
      Return the latest version
      java.util.Map<java.lang.String,​java.lang.String> getMetadata()
      Returns an ordered map containting the metadata that has been associated with the corresponding domain object.
      java.lang.String getName()
      Get the name of the StoredObj that is associated with the data.
      DomainObject getOpenedDomainObject​(java.lang.Object consumer)
      Returns the domainObject for this DomainFile only if it is already open.
      DomainFolder getParent()
      Get the parent domain folder for this domain file.
      java.lang.String getPathname()
      Returns the path name to the domain object.
      ProjectLocator getProjectLocator()
      Returns the local storage location for the project that this DomainFile belongs to.
      DomainObject getReadOnlyDomainObject​(java.lang.Object consumer, int version, TaskMonitor monitor)
      Returns a "read-only" version of the domain object.
      LocalFileSystem getUserFileSystem()  
      int getVersion()
      Return either the latest version if the file is not checked-out or the version that was checked-out or a specific version that was requested.
      Version[] getVersionHistory()
      Returns list of all available versions.
      int hashCode()  
      boolean isBusy()
      Returns true if the domain object in this domain file exists and has an open transaction.
      boolean isChanged()
      Return whether the domain object in this domain file has changed.
      boolean isCheckedOut()
      Returns true if this is a checked-out file.
      boolean isCheckedOutExclusive()
      Returns true if this a checked-out file with exclusive access.
      boolean isHijacked()
      Returns true if the file is versioned but a private copy also exists.
      boolean isInWritableProject()
      Returns true if this file is in a writable project.
      boolean isLatestVersion()
      Returns true if this file represents the latest version of the associated domain object.
      boolean isOpen()
      Returns true if there is an open domainObject for this file.
      boolean isReadOnly()
      Returns whether the object is read-only.
      boolean isVersionControlSupported()
      Returns true if the versioned filesystem can be used to store this files content type.
      boolean isVersioned()
      Return true if this is a versioned database, else false
      long length()
      Returns the length of this domain file.
      void merge​(boolean okToUpgrade, TaskMonitor monitor)
      Performs merge from current version of versioned file into local checked-out file.
      boolean modifiedSinceCheckout()
      Returns true if this is a checked-out file which has been modified since it was checked-out.
      GhidraFile moveTo​(DomainFolder newParent)
      Move this file into the newParent folder.
      void packFile​(java.io.File file, TaskMonitor monitor)
      Pack domain file into specified file.
      void save​(TaskMonitor monitor)
      Save the DomainObject associated with this file.
      GhidraFile setName​(java.lang.String newName)
      Set the name on this domain file.
      void setReadOnly​(boolean state)
      Sets the object to read-only.
      boolean takeRecoverySnapshot()
      If the file has an updateable domain object with unsaved changes, generate a recovery snapshot.
      void terminateCheckout​(long checkoutId)
      Forcefully terminate a checkout for the associated versioned file.
      java.lang.String toString()  
      void undoCheckout​(boolean keep)
      Undo "checked-out" file.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail