inode

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 6 Imported by: 0

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 {
	Name []byte
	// contains filtered or unexported fields
}

type EDevice

type EDevice struct {
	Device
	XattrInd uint32
}

func ReadEDevice

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

type EDirectory

type EDirectory struct {
	Indexes []DirectoryIndex
	// contains filtered or unexported fields
}

func ReadEDir

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

type EFile

type EFile struct {
	BlockSizes []uint32
	// contains filtered or unexported fields
}

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 {
	Target   []byte
	XattrInd uint32
	// contains filtered or unexported fields
}

func ReadESym

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

type File

type File struct {
	BlockSizes []uint32
	// contains filtered or unexported fields
}

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 {
	Target []byte
	// contains filtered or unexported fields
}

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