erofs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package erofs provides a read-only reader for uncompressed EROFS images. The on-disk layout follows the Linux kernel's fs/erofs/erofs_fs.h; the parsing code is adapted from the MIT-licensed github.com/emmanuel-deloget/fsforge/pkg/erofs reader.

Package erofs implements a read-only reader for uncompressed EROFS (Enhanced Read-Only File System) images. It understands both inode forms (compact 32-byte and extended 64-byte) and the two uncompressed data layouts (FLAT_PLAIN and FLAT_INLINE); compressed inodes are rejected. The layout follows the Linux kernel's fs/erofs/erofs_fs.h, as also implemented in the MIT-licensed github.com/emmanuel-deloget/fsforge reader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(ra io.ReaderAt, start int64) bool

Detect reports whether ra holds an EROFS filesystem starting at start.

Types

type FS

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

FS is a read-only, lazy EROFS filesystem. Paths use the io/fs convention: "." is the root and nested paths are slash-relative without a leading slash.

func Open

func Open(ra io.ReaderAt, start int64) (*FS, error)

Open parses the EROFS filesystem starting at absolute byte offset start.

func (*FS) Close

func (f *FS) Close() error

Close releases no resources.

func (*FS) Open

func (f *FS) Open(path string) (fs.File, error)

Open opens a regular file for reading.

func (*FS) ReadDir

func (f *FS) ReadDir(path string) ([]fs.DirEntry, error)

ReadDir lists the immediate children of a directory.

func (f *FS) Readlink(path string) (string, error)

Readlink returns the target of a symlink.

func (*FS) Stat

func (f *FS) Stat(path string) (fs.FileInfo, error)

Stat returns file info for path with lstat semantics.

Jump to

Keyboard shortcuts

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