Class UnknownFolderItem

java.lang.Object
ghidra.framework.store.local.LocalFolderItem
ghidra.framework.store.local.UnknownFolderItem
All Implemented Interfaces:
FolderItem

public class UnknownFolderItem extends LocalFolderItem
UnknownFolderItem acts as a LocalFolderItem place-holder for items of an unknown type.
  • Field Details

  • Method Details

    • length

      public long length() throws IOException
      Description copied from interface: FolderItem
      Returns the length of this domain file. This size is the minimum disk space used for storing this file, but does not account for additional storage space used to tracks changes, etc.
      Returns:
      file length
      Throws:
      IOException - thrown if IO or access error occurs
    • updateCheckout

      public void updateCheckout(FolderItem versionedFolderItem, boolean updateItem, TaskMonitor monitor) throws IOException
      Description copied from class: LocalFolderItem
      Update this non-versioned item with the latest version of the specified versioned item.
      Specified by:
      updateCheckout in class LocalFolderItem
      Parameters:
      versionedFolderItem - versioned item which corresponds to this non-versioned item.
      updateItem - if true this items content is updated using the versionedFolderItem
      monitor - progress monitor for update
      Throws:
      IOException - if this file is not a checked-out non-versioned file or an IO error occurs.
    • updateCheckout

      public void updateCheckout(FolderItem item, int checkoutVersion) throws IOException
      Description copied from class: LocalFolderItem
      Update this non-versioned item with the contents of the specified item which must be within the same non-versioned fileSystem. If successful, the specified item will be removed after its content has been moved into this item.
      Specified by:
      updateCheckout in class LocalFolderItem
      Parameters:
      item -
      checkoutVersion -
      Throws:
      IOException - if this file is not a checked-out non-versioned file or an IO error occurs.
    • checkout

      public ItemCheckoutStatus checkout(String user) throws IOException
      Throws:
      IOException
    • terminateCheckout

      public void terminateCheckout(long checkoutId)
    • clearCheckout

      public void clearCheckout() throws IOException
      Description copied from interface: FolderItem
      Clears the checkout data associated with this non-shared file. NOTE: This method is only valid for a local non-versioned file-system.
      Specified by:
      clearCheckout in interface FolderItem
      Overrides:
      clearCheckout in class LocalFolderItem
      Throws:
      IOException
    • setCheckout

      public void setCheckout(long checkoutId, int checkoutVersion, int localVersion)
    • getCheckout

      public ItemCheckoutStatus getCheckout(long checkoutId) throws IOException
      Description copied from interface: FolderItem
      Get the checkout status which corresponds to the specified checkout ID.
      Specified by:
      getCheckout in interface FolderItem
      Overrides:
      getCheckout in class LocalFolderItem
      Parameters:
      checkoutId - checkout ID
      Returns:
      checkout status or null if checkout ID not found.
      Throws:
      IOException - if an IO error occurs or this item is not versioned
    • getCheckouts

      public ItemCheckoutStatus[] getCheckouts() throws IOException
      Description copied from interface: FolderItem
      Get all current checkouts for this item.
      Specified by:
      getCheckouts in interface FolderItem
      Overrides:
      getCheckouts in class LocalFolderItem
      Returns:
      array of checkouts
      Throws:
      IOException - if an IO error occurs or this item is not versioned
    • getVersions

      public Version[] getVersions() throws IOException
      Description copied from interface: FolderItem
      Returns list of all available versions or null if item is not versioned.
      Specified by:
      getVersions in interface FolderItem
      Overrides:
      getVersions in class LocalFolderItem
      Throws:
      IOException - thrown if an IO error occurs.
      See Also:
    • getContentType

      public String getContentType()
      Description copied from interface: FolderItem
      Return The content type name for this item.
      Specified by:
      getContentType in interface FolderItem
      Overrides:
      getContentType in class LocalFolderItem
      See Also:
    • output

      public void output(File outputFile, int version, TaskMonitor monitor) throws IOException
      Description copied from interface: FolderItem
      Serialize (i.e., pack) this item into the specified outputFile.
      Parameters:
      outputFile - packed output file to be created
      version - if this item is versioned, specifies the version to be output, otherwise -1 should be specified.
      monitor - progress monitor
      Throws:
      IOException
    • getCurrentVersion

      public int getCurrentVersion()
      Description copied from interface: FolderItem
      Return the latest/current version.
    • canRecover

      public boolean canRecover()
      Description copied from interface: FolderItem
      Returns true if unsaved file changes can be recovered.