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
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 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
-
Constructor Summary
ModifierConstructorDescriptionprotected
IndexedV1LocalFileSystem
(String rootPath, boolean isVersioned, boolean readOnly, boolean enableAsyncronousDispatching, boolean create) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
fileIdChanged
(PropertyFile pfile, String oldFileId) Notification that FileID has been changed within propertyFileint
Returns the FolderItem specified by its unique File-IDstatic boolean
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, checkDisposed, cleanupAfterConstruction, createDatabase, createDatabase, createDataFile, createFile, createTemporaryDatabase, deleteEmptyVersionedFolders, escapeHiddenDirPrefixChars, fileExists, getItem, getItemNames, getItems, 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:
getIndexImplementationVersion
in classIndexedLocalFileSystem
-
fileIdChanged
Description copied from class:LocalFileSystem
Notification that FileID has been changed within propertyFile- Overrides:
fileIdChanged
in classLocalFileSystem
- Parameters:
pfile
-oldFileId
-- Throws:
IOException
-
getItem
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:
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
-