fs

package
v0.0.0-...-c4ea246 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	Name  string `json:"name"`
	Inode uint64 `json:"inode"`
	Type  uint8  `json:"type"`
	IsDir bool   `json:"is_dir"`
}

DirEntry represents a directory entry.

type FileSystem

type FileSystem struct {
	// contains filtered or unexported fields
}

FileSystem represents a Btrfs filesystem.

func Open

func Open(devicePath string) (*FileSystem, error)

Open opens a filesystem.

func (*FileSystem) Close

func (fs *FileSystem) Close() error

Close closes the filesystem.

func (*FileSystem) ListDirectory

func (fs *FileSystem) ListDirectory(path string) ([]*DirEntry, error)

ListDirectory lists directory contents.

func (*FileSystem) ReadFile

func (fs *FileSystem) ReadFile(path string) ([]byte, error)

ReadFile reads file contents.

func (*FileSystem) ReadNode

func (fs *FileSystem) ReadNode(logical uint64, nodeSize uint32) (*btree.Node, error)

ReadNode implements btree.NodeReader.

type InodeInfo

type InodeInfo struct {
	Ino  uint64
	Size uint64
	Mode uint32
}

InodeInfo holds inode information.

Jump to

Keyboard shortcuts

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