Package ghidra.framework.store.local
Class UnknownFolderItem
- java.lang.Object
-
- ghidra.framework.store.local.LocalFolderItem
-
- ghidra.framework.store.local.UnknownFolderItem
-
- All Implemented Interfaces:
FolderItem
public class UnknownFolderItem extends LocalFolderItem
UnknownFolderItemacts as a LocalFolderItem place-holder for items of an unknown type.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUNKNOWN_CONTENT_TYPE-
Fields inherited from interface ghidra.framework.store.FolderItem
DATABASE_FILE_TYPE, DATAFILE_FILE_TYPE, DEFAULT_CHECKOUT_ID, LATEST_VERSION, UNKNOWN_FILE_TYPE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRecover()Returns true if unsaved file changes can be recovered.ItemCheckoutStatuscheckout(java.lang.String user)voidclearCheckout()Clears the checkout data associated with this non-shared file.ItemCheckoutStatusgetCheckout(long checkoutId)Get the checkout status which corresponds to the specified checkout ID.ItemCheckoutStatus[]getCheckouts()Get all current checkouts for this item.java.lang.StringgetContentType()Return The content type name for this item.intgetCurrentVersion()Return the latest/current version.Version[]getVersions()Returns list of all available versions or null if item is not versioned.longlength()Returns the length of this domain file.voidoutput(java.io.File outputFile, int version, TaskMonitor monitor)Serialize (i.e., pack) this item into the specified outputFile.voidsetCheckout(long checkoutId, int checkoutVersion, int localVersion)voidterminateCheckout(long checkoutId)voidupdateCheckout(FolderItem versionedFolderItem, boolean updateItem, TaskMonitor monitor)Update this non-versioned item with the latest version of the specified versioned item.voidupdateCheckout(FolderItem item, int checkoutVersion)Update this non-versioned item with the contents of the specified item which must be within the same non-versioned fileSystem.-
Methods inherited from class ghidra.framework.store.local.LocalFolderItem
checkout, delete, equals, getCheckoutId, getCheckoutVersion, getContentTypeVersion, getFileID, getLocalCheckoutVersion, getName, getParentPath, getPathName, hasCheckouts, isCheckedOut, isCheckedOutExclusive, isCheckinActive, isReadOnly, isVersioned, lastModified, refresh, resetFileID, setCheckout, setContentTypeVersion, setReadOnly, terminateCheckout, updateCheckoutVersion
-
-
-
-
Field Detail
-
UNKNOWN_CONTENT_TYPE
public static final java.lang.String UNKNOWN_CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
length
public long length() throws java.io.IOExceptionDescription copied from interface:FolderItemReturns 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:
java.io.IOException- thrown if IO or access error occurs
-
updateCheckout
public void updateCheckout(FolderItem versionedFolderItem, boolean updateItem, TaskMonitor monitor) throws java.io.IOException
Description copied from class:LocalFolderItemUpdate this non-versioned item with the latest version of the specified versioned item.- Specified by:
updateCheckoutin classLocalFolderItem- Parameters:
versionedFolderItem- versioned item which corresponds to this non-versioned item.updateItem- if true this items content is updated using the versionedFolderItemmonitor- progress monitor for update- Throws:
java.io.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 java.io.IOException
Description copied from class:LocalFolderItemUpdate 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:
updateCheckoutin classLocalFolderItem- Throws:
java.io.IOException- if this file is not a checked-out non-versioned file or an IO error occurs.
-
checkout
public ItemCheckoutStatus checkout(java.lang.String user) throws java.io.IOException
- Throws:
java.io.IOException
-
terminateCheckout
public void terminateCheckout(long checkoutId)
-
clearCheckout
public void clearCheckout() throws java.io.IOExceptionDescription copied from interface:FolderItemClears the checkout data associated with this non-shared file. NOTE: This method is only valid for a local non-versioned file-system.- Specified by:
clearCheckoutin interfaceFolderItem- Overrides:
clearCheckoutin classLocalFolderItem- Throws:
java.io.IOException
-
setCheckout
public void setCheckout(long checkoutId, int checkoutVersion, int localVersion)
-
getCheckout
public ItemCheckoutStatus getCheckout(long checkoutId) throws java.io.IOException
Description copied from interface:FolderItemGet the checkout status which corresponds to the specified checkout ID.- Specified by:
getCheckoutin interfaceFolderItem- Overrides:
getCheckoutin classLocalFolderItem- Parameters:
checkoutId- checkout ID- Returns:
- checkout status or null if checkout ID not found.
- Throws:
java.io.IOException- if an IO error occurs or this item is not versioned
-
getCheckouts
public ItemCheckoutStatus[] getCheckouts() throws java.io.IOException
Description copied from interface:FolderItemGet all current checkouts for this item.- Specified by:
getCheckoutsin interfaceFolderItem- Overrides:
getCheckoutsin classLocalFolderItem- Returns:
- list of checkouts
- Throws:
java.io.IOException- if an IO error occurs or this item is not versioned
-
getVersions
public Version[] getVersions() throws java.io.IOException
Description copied from interface:FolderItemReturns list of all available versions or null if item is not versioned.- Specified by:
getVersionsin interfaceFolderItem- Overrides:
getVersionsin classLocalFolderItem- Throws:
java.io.IOException- thrown if an IO error occurs.- See Also:
FolderItem.getVersions()
-
getContentType
public java.lang.String getContentType()
Description copied from interface:FolderItemReturn The content type name for this item.- Specified by:
getContentTypein interfaceFolderItem- Overrides:
getContentTypein classLocalFolderItem- See Also:
FolderItem.getContentType()
-
output
public void output(java.io.File outputFile, int version, TaskMonitor monitor) throws java.io.IOExceptionDescription copied from interface:FolderItemSerialize (i.e., pack) this item into the specified outputFile.- Parameters:
outputFile- packed output file to be createdversion- if this item is versioned, specifies the version to be output, otherwise -1 should be specified.monitor- progress monitor- Throws:
java.io.IOException
-
getCurrentVersion
public int getCurrentVersion()
Description copied from interface:FolderItemReturn the latest/current version.
-
canRecover
public boolean canRecover()
Description copied from interface:FolderItemReturns true if unsaved file changes can be recovered.
-
-