inode

package
v0.0.0-...-38926f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址