Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const DirentSize + const FeatureCompatSuperBlockChecksum + const FeatureIncompatSupported + const InodeCompactSize + const InodeDataLayoutBit + const InodeDataLayoutBits + const InodeDataLayoutChunkBased + const InodeDataLayoutFlatCompression + const InodeDataLayoutFlatCompressionLegacy + const InodeDataLayoutFlatInline + const InodeDataLayoutFlatPlain + const InodeDataLayoutMax + const InodeExtendedSize + const InodeLayoutBit + const InodeLayoutBits + const InodeLayoutCompact + const InodeLayoutExtended + const InodeSlotBits + const MaxNameLen + const SuperBlockMagicV1 + const SuperBlockOffset + const SuperBlockSize + type Dirent struct + FileType uint8 + NameOff uint16 + NidHigh uint32 + NidLow uint32 + Reserved uint8 + func (d *Dirent) Nid() uint64 + type Image struct + func OpenImage(src *os.File) (*Image, error) + func (i *Image) BlockSize() uint32 + func (i *Image) Blocks() uint32 + func (i *Image) BytesAt(off, n uint64) ([]byte, error) + func (i *Image) Close() + func (i *Image) FD() int + func (i *Image) Inode(nid uint64) (Inode, error) + func (i *Image) RootNid() uint64 + func (i *Image) SuperBlock() SuperBlock + type Inode struct + func (i *Inode) Data() (safemem.BlockSeq, error) + func (i *Inode) DataLayout() uint16 + func (i *Inode) DataOffset() (uint64, error) + func (i *Inode) GID() uint32 + func (i *Inode) IsBlockDev() bool + func (i *Inode) IsCharDev() bool + func (i *Inode) IsDir() bool + func (i *Inode) IsFIFO() bool + func (i *Inode) IsRegular() bool + func (i *Inode) IsSocket() bool + func (i *Inode) IsSymlink() bool + func (i *Inode) IterDirents(cb func(name string, typ uint8, nid uint64) error) error + func (i *Inode) Layout() uint16 + func (i *Inode) Lookup(name string) (uint64, error) + func (i *Inode) Mode() uint16 + func (i *Inode) Mtime() uint64 + func (i *Inode) MtimeNsec() uint32 + func (i *Inode) Nid() uint64 + func (i *Inode) Nlink() uint32 + func (i *Inode) Readlink() (string, error) + func (i *Inode) Size() uint64 + func (i *Inode) UID() uint32 + type InodeCompact struct + Format uint16 + GID uint16 + Ino uint32 + Mode uint16 + Nlink uint16 + RawBlockAddr uint32 + Reserved uint32 + Reserved2 uint32 + Size uint32 + UID uint16 + XattrCount uint16 + type InodeExtended struct + Format uint16 + GID uint32 + Ino uint32 + Mode uint16 + Mtime uint64 + MtimeNsec uint32 + Nlink uint32 + RawBlockAddr uint32 + Reserved uint16 + Reserved2 [16]uint8 + Size uint64 + UID uint32 + XattrCount uint16 + type SuperBlock struct + BlockSizeBits uint8 + Blocks uint32 + BuildTime uint64 + BuildTimeNsec uint32 + Checksum uint32 + DevTableSlotOff uint16 + ExtSlots uint8 + ExtraDevices uint16 + FeatureCompat uint32 + FeatureIncompat uint32 + Inodes uint64 + Magic uint32 + MetaBlockAddr uint32 + Reserved [38]uint8 + RootNid uint16 + UUID [16]uint8 + Union1 uint16 + VolumeName [16]uint8 + XattrBlockAddr uint32 + func (sb *SuperBlock) BlockAddrToOffset(addr uint32) uint64 + func (sb *SuperBlock) BlockSize() uint32 + func (sb *SuperBlock) MetaOffset() uint64 + func (sb *SuperBlock) NidToOffset(nid uint64) uint64