exfat

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package exfat implements an exFAT create engine behind image.Filesystem.

Like FAT, exFAT is a DOS-lineage filesystem with no owners, permissions, symlinks or hard links, so those tree attributes are dropped (symlinks are an error). It targets large volumes and removable media. fsforge writes every object contiguously with the NoFatChain flag, so the FAT holds only its two reserved entries and the allocation bitmap is the authority for used space.

The layout is deterministic (sequential cluster allocation, timestamps from node ModTime) for reproducible images. The up-case table covers ASCII case folding, which matches typical filenames; name hashes use the same table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExFAT

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

ExFAT is the exFAT engine, implementing image.Filesystem. Format writes large/removable-media volumes whose images pass fsck.exfat; being a DOS-lineage format it carries no owners, permissions or links, and symlinks are rejected. Open parses an existing volume into the tree so exFAT can be a conversion source, but the opened image is read-only (mutation rebuilds). See the package doc for the on-disk strategy.

func New

func New(deps image.Deps) *ExFAT

New returns an exFAT engine wired with deps. Nil Clock/UUID are replaced with the host system clock and random UUIDs.

func (*ExFAT) Format

func (e *ExFAT) Format(dev device.Device, p image.Params) (image.Image, error)

Format prepares a fresh exFAT volume sized to fill dev. dev must be large enough for the boot region, allocation bitmap, up-case table and root directory; an error is returned otherwise. p.Label sets the volume label.

func (*ExFAT) Open

func (e *ExFAT) Open(dev device.Device) (image.Image, error)

Open reads an existing exFAT volume into the agnostic tree, so exFAT can be a conversion source. Directory metadata is parsed eagerly; file contents stay lazy, read per cluster on demand. The returned image is read-only: exFAT is write-once for fsforge, so Finalize reports that it cannot be re-finalized in place (rebuild via convert to change it).

Jump to

Keyboard shortcuts

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