Package ghidra.framework.store.local
Class IndexedV1LocalFileSystem
- java.lang.Object
-
- ghidra.framework.store.local.LocalFileSystem
-
- ghidra.framework.store.local.IndexedLocalFileSystem
-
- ghidra.framework.store.local.IndexedV1LocalFileSystem
-
- All Implemented Interfaces:
FileSystem
public class IndexedV1LocalFileSystem extends IndexedLocalFileSystem
IndexedLocalFileSystem
implements a case-sensitive indexed filesystem which uses a shallow storage hierarchy with no restriction on file name or path length. This filesystem is identified by the existence of an index file (~index.dat) and recovery journal (~index.jrn).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ghidra.framework.store.local.IndexedLocalFileSystem
IndexedLocalFileSystem.BadStorageNameException, IndexedLocalFileSystem.IndexReadException, IndexedLocalFileSystem.IndexVersionException
-
Nested classes/interfaces inherited from class ghidra.framework.store.local.LocalFileSystem
LocalFileSystem.ItemStorage
-
-
Field Summary
Fields Modifier and Type Field Description static int
INDEX_VERSION
-
Fields inherited from class ghidra.framework.store.local.IndexedLocalFileSystem
INDEX_ITEM_INDENT, INDEX_ITEM_SEPARATOR, LATEST_INDEX_VERSION
-
Fields inherited from class ghidra.framework.store.local.LocalFileSystem
eventManager, HIDDEN_DIR_PREFIX, HIDDEN_DIR_PREFIX_CHAR, HIDDEN_ITEM_PREFIX, isVersioned, readOnly, root
-
Fields inherited from interface ghidra.framework.store.FileSystem
SEPARATOR, SEPARATOR_CHAR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fileIdChanged(PropertyFile pfile, java.lang.String oldFileId)
Notification that FileID has been changed within propertyFileint
getIndexImplementationVersion()
FolderItem
getItem(java.lang.String fileID)
Returns the FolderItem specified by its unique File-IDstatic boolean
rebuild(java.io.File rootDir)
Completely rebuild filesystem index using item information contained within indexed property files.-
Methods inherited from class ghidra.framework.store.local.IndexedLocalFileSystem
allocateItemStorage, createFolder, deallocateItemStorage, deleteFolder, dispose, findItemStorage, folderExists, getFolderNames, getItemCount, getItemNames, getMaxNameLength, hasIndexedStructure, isIndexed, itemDeleted, moveFolder, moveItem, readIndexVersion, renameFolder
-
Methods inherited from class ghidra.framework.store.local.LocalFileSystem
addFileSystemListener, cleanupAfterConstruction, createDatabase, createDatabase, createDataFile, createFile, createTemporaryDatabase, deleteEmptyVersionedFolders, escapeHiddenDirPrefixChars, fileExists, getItem, getItemNames, getLocalFileSystem, getName, getParentPath, getPath, getUserName, isHiddenDirName, isOnline, isReadOnly, isRefreshRequired, isShared, isValidNameCharacter, isVersioned, log, migrationInProgress, removeFileSystemListener, setAssociatedRepositoryLogger, setValidationRequired, testValidName, unescapeHiddenDirPrefixChars
-
-
-
-
Field Detail
-
INDEX_VERSION
public static final int INDEX_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndexImplementationVersion
public int getIndexImplementationVersion()
- Overrides:
getIndexImplementationVersion
in classIndexedLocalFileSystem
-
fileIdChanged
protected void fileIdChanged(PropertyFile pfile, java.lang.String oldFileId) throws java.io.IOException
Description copied from class:LocalFileSystem
Notification that FileID has been changed within propertyFile- Overrides:
fileIdChanged
in classLocalFileSystem
- Throws:
java.io.IOException
-
getItem
public FolderItem getItem(java.lang.String fileID) throws java.io.IOException, java.lang.UnsupportedOperationException
Description copied from interface:FileSystem
Returns the FolderItem specified by its unique File-ID- Specified by:
getItem
in interfaceFileSystem
- Overrides:
getItem
in classLocalFileSystem
- Parameters:
fileID
- the items unique file ID- Returns:
- the FolderItem with the given folderPath and name, or null if it doesn't exist.
- Throws:
java.io.IOException
- if IO error occurs.java.lang.UnsupportedOperationException
- if file-system does not support this operation
-
rebuild
public static boolean rebuild(java.io.File rootDir) throws java.io.IOException
Completely rebuild filesystem index using item information contained within indexed property files. Empty folders will be lost.- Parameters:
rootDir
-- Throws:
java.io.IOException
-
-