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
IndexedV1LocalFileSystem 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). File system also maintains a file-ID mapping.-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.framework.store.local.IndexedLocalFileSystem
IndexedLocalFileSystem.BadStorageNameException, IndexedLocalFileSystem.IndexReadException, IndexedLocalFileSystem.IndexVersionExceptionNested classes/interfaces inherited from class ghidra.framework.store.local.LocalFileSystem
LocalFileSystem.ItemStorage -
Field Summary
FieldsFields inherited from class ghidra.framework.store.local.IndexedLocalFileSystem
INDEX_ITEM_INDENT, INDEX_ITEM_SEPARATOR, LATEST_INDEX_VERSIONFields inherited from class ghidra.framework.store.local.LocalFileSystem
eventManager, HIDDEN_DIR_PREFIX, HIDDEN_DIR_PREFIX_CHAR, HIDDEN_ITEM_PREFIX, isVersioned, readOnly, rootFields inherited from interface ghidra.framework.store.FileSystem
SEPARATOR, SEPARATOR_CHAR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIndexedV1LocalFileSystem(String rootPath, boolean isVersioned, boolean readOnly, boolean enableAsyncronousDispatching, boolean create) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfileIdChanged(PropertyFile pfile, String oldFileId) Notification that FileID has been changed within propertyFileintReturns the FolderItem specified by its unique File-IDstatic booleanCompletely 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, getItems, getMaxNameLength, hasIndexedStructure, isIndexed, itemDeleted, moveFolder, moveItem, readIndexVersion, renameFolderMethods inherited from class ghidra.framework.store.local.LocalFileSystem
addFileSystemListener, checkDisposed, 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 Details
-
INDEX_VERSION
public static final int INDEX_VERSION- See Also:
-
-
Constructor Details
-
IndexedV1LocalFileSystem
protected IndexedV1LocalFileSystem(String rootPath, boolean isVersioned, boolean readOnly, boolean enableAsyncronousDispatching, boolean create) throws IOException Constructor.- Parameters:
rootPath- path for root directory.isVersioned- if true item versioning will be enabled.readOnly- if true modifications within this file-system will not be allowed and result in an ReadOnlyExceptionenableAsyncronousDispatching- if true a separate dispatch thread will be used to notify listeners. If false, blocking notification will be performed.create- if true a new folder will be created.- Throws:
FileNotFoundException- if specified rootPath does not existIOException- if error occurs while reading/writing index files
-
-
Method Details
-
getIndexImplementationVersion
public int getIndexImplementationVersion()- Overrides:
getIndexImplementationVersionin classIndexedLocalFileSystem
-
fileIdChanged
Description copied from class:LocalFileSystemNotification that FileID has been changed within propertyFile- Overrides:
fileIdChangedin classLocalFileSystem- Parameters:
pfile-oldFileId-- Throws:
IOException
-
getItem
Description copied from interface:FileSystemReturns the FolderItem specified by its unique File-ID- Specified by:
getItemin interfaceFileSystem- Overrides:
getItemin 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:
IOException- if IO error occurs.UnsupportedOperationException- if file-system does not support this operation
-
rebuild
Completely rebuild filesystem index using item information contained within indexed property files. Empty folders will be lost.- Parameters:
rootDir-- Throws:
IOException
-