xfs

package
v0.0.0-...-ed0a78e Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package xfs implements a read/write XFS filesystem driver (v4 and v5). All metadata is big-endian as required by the XFS specification. I/O is zero-copy via an io.SectionReader; writes land in a dirty-block cache that is flushed to the backing store on Unmount.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Volume

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

Volume implements fs.Volume for an XFS partition.

func Open

func Open(ra io.ReaderAt, offset, size int64) (*Volume, error)

Open parses the XFS superblock and AG headers from the given partition bounds and returns a ready-to-use Volume.

func (*Volume) Chmod

func (v *Volume) Chmod(name string, mode fs.FileMode) error

func (*Volume) Chown

func (v *Volume) Chown(name string, uid, gid int) error

func (*Volume) Chtimes

func (v *Volume) Chtimes(name string, atime, mtime time.Time) error

func (*Volume) Create

func (v *Volume) Create(name string) (*volfs.File, error)
func (v *Volume) Link(oldname, newname string) error

func (*Volume) Lstat

func (v *Volume) Lstat(name string) (fs.FileInfo, error)

func (*Volume) Mkdir

func (v *Volume) Mkdir(name string, perm fs.FileMode) error

func (*Volume) MkdirAll

func (v *Volume) MkdirAll(p string, perm fs.FileMode) error

func (*Volume) Open

func (v *Volume) Open(name string) (fs.File, error)

func (*Volume) OpenFile

func (v *Volume) OpenFile(name string, flag int, perm fs.FileMode) (*volfs.File, error)

func (*Volume) ReadDir

func (v *Volume) ReadDir(name string) ([]fs.DirEntry, error)

func (*Volume) ReadFile

func (v *Volume) ReadFile(name string) ([]byte, error)
func (v *Volume) Readlink(name string) (string, error)

func (*Volume) Remove

func (v *Volume) Remove(name string) error

func (*Volume) RemoveAll

func (v *Volume) RemoveAll(p string) error

func (*Volume) Rename

func (v *Volume) Rename(oldpath, newpath string) error

func (*Volume) Stat

func (v *Volume) Stat(name string) (fs.FileInfo, error)

func (*Volume) StatFS

func (v *Volume) StatFS() (volfs.VolumeInfo, error)
func (v *Volume) Symlink(oldname, newname string) error

func (*Volume) Type

func (v *Volume) Type() fstype.Type

Type returns "xfs".

func (*Volume) Unmount

func (v *Volume) Unmount() error

Unmount flushes all dirty blocks and inodes to the backing store, then releases all in-memory state.

func (*Volume) WriteFile

func (v *Volume) WriteFile(name string, data []byte, perm fs.FileMode) error

Jump to

Keyboard shortcuts

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