Package ghidra.framework.store.local
Class ItemPropertyFile
java.lang.Object
ghidra.util.PropertyFile
ghidra.framework.store.local.ItemPropertyFile
- Direct Known Subclasses:
IndexedPropertyFile,InvalidPropertyFile
ItemPropertyFile provides basic property storage which is primarily intended to
store limited information related to a logical FolderItem. The file
extension used is PropertyFile.PROPERTY_EXT.-
Field Summary
FieldsFields inherited from class ghidra.util.PropertyFile
PROPERTY_EXT, propertyFile, storageName -
Constructor Summary
ConstructorsConstructorDescriptionItemPropertyFile(File dir, String storageName, String parentPath, String name) Construct a new or existing PropertyFile. -
Method Summary
Modifier and TypeMethodDescriptionReturns the FileID associated with this file.getName()Return the name of the item associated with this PropertyFile.Return the logical parent path containing the item descibed by this PropertyFile.getPath()Return the logical path of the item associated with this PropertyFile.final voidDeprecated.method must not be usedvoidMove this PropertyFile to the newParent file.voidSet the FileID associated with this file.Methods inherited from class ghidra.util.PropertyFile
contains, delete, equals, exists, getBoolean, getInt, getLong, getParentStorageDirectory, getStorageName, getString, hashCode, isReadOnly, lastModified, putBoolean, putInt, putLong, putString, readState, remove, writeState
-
Field Details
-
name
-
parentPath
-
-
Constructor Details
-
ItemPropertyFile
public ItemPropertyFile(File dir, String storageName, String parentPath, String name) throws IOException Construct a new or existing PropertyFile. This constructor ignores retained property values for NAME and PARENT path. This constructor will not throw an exception if the file does not exist.- Parameters:
dir- native directory where this file is storedstorageName- stored property file name (without extension)parentPath- logical parent path for the associated itemname- name of the associated item- Throws:
InvalidObjectException- if a file parse error occursIOException- if an IO error occurs reading an existing file
-
-
Method Details
-
getName
Return the name of the item associated with this PropertyFile. A null value may be returned if this is an older property file and the name was not specified at time of construction.- Returns:
- associated item name or null if unknown
-
getPath
Return the logical path of the item associated with this PropertyFile. A null value may be returned if this is an older property file and the name and parentPath was not specified at time of construction.- Returns:
- logical path of the associated item or null if unknown
-
getParentPath
Return the logical parent path containing the item descibed by this PropertyFile.- Returns:
- logical parent directory path
-
getFileID
Returns the FileID associated with this file.- Returns:
- FileID associated with this file or null
-
setFileID
Set the FileID associated with this file.- Parameters:
fileId- unique file ID
-
moveTo
public void moveTo(File newStorageParent, String newStorageName, String newParentPath, String newName) throws DuplicateFileException, IOException Move this PropertyFile to the newParent file.- Parameters:
newStorageParent- new storage parent of the native filenewStorageName- new storage name for this property filenewParentPath- new logical parent pathnewName- new logical item name- Throws:
IOException- thrown if there was a problem accessing theDuplicateFileException- thrown if a file with the newName already exists
-
moveTo
@Deprecated(forRemoval=false, since="11.4") public final void moveTo(File newStorageParent, String newStorageName) throws javax.help.UnsupportedOperationException Deprecated.method must not be usedNOTE!! This method must not be used.Movement of an item is related to its logical pathname and must be accomplished with the
moveTo(File, String, String, String)method. There is no supported direct use of this method.- Overrides:
moveToin classPropertyFile- Parameters:
newStorageParent- new storage parent of the native filenewStorageName- new storage name for this property file- Throws:
javax.help.UnsupportedOperationException- always thrown
-