inode

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2025 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Dir = uint16(iota + 1)
	Fil
	Sym
	Block
	Char
	Fifo
	Sock
	EDir
	EFil
	ESym
	EBlock
	EChar
	EFifo
	ESock
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	LinkCount uint32
	Dev       uint32
}

func ReadDevice

func ReadDevice(r io.Reader) (d Device, err error)

type Directory

type Directory struct {
	BlockStart uint32
	LinkCount  uint32
	Size       uint16
	Offset     uint16
	ParentNum  uint32
}

func ReadDir

func ReadDir(r io.Reader) (d Directory, err error)

type DirectoryIndex

type DirectoryIndex struct {
	Ind      uint32
	Start    uint32
	NameSize uint32
	Name     []byte
}

type EDevice

type EDevice struct {
	Device
	XattrInd uint32
}

func ReadEDevice

func ReadEDevice(r io.Reader) (d EDevice, err error)

type EDirectory

type EDirectory struct {
	LinkCount  uint32
	Size       uint32
	BlockStart uint32
	ParentNum  uint32
	IndCount   uint16
	Offset     uint16
	XattrInd   uint32
	Indexes    []DirectoryIndex
}

func ReadEDir

func ReadEDir(r io.Reader) (d EDirectory, err error)

type EFile

type EFile struct {
	BlockStart uint64
	Size       uint64
	Sparse     uint64
	LinkCount  uint32
	FragInd    uint32
	FragOffset uint32
	XattrInd   uint32
	BlockSizes []uint32
}

func ReadEFile

func ReadEFile(r io.Reader, blockSize uint32) (f EFile, err error)

type EIPC

type EIPC struct {
	IPC
	XattrInd uint32
}

func ReadEIPC

func ReadEIPC(r io.Reader) (i EIPC, err error)
type ESymlink struct {
	LinkCount  uint32
	TargetSize uint32
	Target     []byte
	XattrInd   uint32
}

func ReadESym

func ReadESym(r io.Reader) (s ESymlink, err error)

type File

type File struct {
	BlockStart uint32
	FragInd    uint32
	FragOffset uint32
	Size       uint32
	BlockSizes []uint32
}

func ReadFile

func ReadFile(r io.Reader, blockSize uint32) (f File, err error)
type Header struct {
	Type    uint16
	Perm    uint16
	UidInd  uint16
	GidInd  uint16
	ModTime uint32
	Num     uint32
}

type IPC

type IPC struct {
	LinkCount uint32
}

func ReadIPC

func ReadIPC(r io.Reader) (i IPC, err error)

type Inode

type Inode struct {
	Header
	Data any
}

func Read

func Read(r io.Reader, blockSize uint32) (i Inode, err error)

func (Inode) LinkCount

func (i Inode) LinkCount() uint32

func (Inode) Mode

func (i Inode) Mode() (out fs.FileMode)

func (Inode) Size

func (i Inode) Size() uint64
type Symlink struct {
	LinkCount  uint32
	TargetSize uint32
	Target     []byte
}

func ReadSym

func ReadSym(r io.Reader) (s Symlink, err error)

Jump to

Keyboard shortcuts

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