Documentation
¶
Index ¶
- type InodeManager
- func (manager *InodeManager) Close() error
- func (manager *InodeManager) CreateOrGetInodeIDForStagingEntry(path string) (uint64, error)
- func (manager *InodeManager) GetInodeIDForStagingEntry(path string) (uint64, bool)
- func (manager *InodeManager) GetPathForStagingEntryID(inodeID uint64) (string, bool, error)
- func (manager *InodeManager) RemoveStagingEntry(path string) error
- func (manager *InodeManager) RenameStagingEntry(oldPath string, newPath string) error
- func (manager *InodeManager) RenameStagingEntryTree(oldPath string, newPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InodeManager ¶
type InodeManager struct {
// contains filtered or unexported fields
}
InodeManager is a struct that manages inode.
func NewInodeManager ¶
func NewInodeManager() *InodeManager
NewInodeManager creates a new InodeManager
func NewInodeManagerWithPersistence ¶
func NewInodeManagerWithPersistence(localRootPath string) (*InodeManager, error)
NewInodeManagerWithPersistence creates a new InodeManager backed by Badger. The database is runtime-only: metadata left by a previous process is removed instead of being restored.
func (*InodeManager) Close ¶
func (manager *InodeManager) Close() error
Close closes the Badger database and removes its runtime-only metadata.
func (*InodeManager) CreateOrGetInodeIDForStagingEntry ¶
func (manager *InodeManager) CreateOrGetInodeIDForStagingEntry(path string) (uint64, error)
CreateOrGetInodeIDForStagingEntry returns inode id for a staging entry (locally buffered), if not exists, generate one.
func (*InodeManager) GetInodeIDForStagingEntry ¶
func (manager *InodeManager) GetInodeIDForStagingEntry(path string) (uint64, bool)
GetInodeIDForStagingEntry returns inode id for a staging entry (locally buffered).
func (*InodeManager) GetPathForStagingEntryID ¶
func (manager *InodeManager) GetPathForStagingEntryID(inodeID uint64) (string, bool, error)
GetPathForStagingEntryID returns the path for a given staging inode ID.
func (*InodeManager) RemoveStagingEntry ¶
func (manager *InodeManager) RemoveStagingEntry(path string) error
RemoveStagingEntry removes a staging entry
func (*InodeManager) RenameStagingEntry ¶
func (manager *InodeManager) RenameStagingEntry(oldPath string, newPath string) error
RenameStagingEntry moves a staging entry to a new path while preserving its inode ID.
func (*InodeManager) RenameStagingEntryTree ¶
func (manager *InodeManager) RenameStagingEntryTree(oldPath string, newPath string) error
RenameStagingEntryTree moves a directory and all staging entries below it while preserving every inode ID.