sync

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFS

func CompareFS(origFS, targetFS fs.FS) error

CompareFS compares two fs.FS instances for identical structure and contents.

func CopyFileSystem

func CopyFileSystem(src fs.FS, dst filesystem.FileSystem) error

CopyFileSystem copies files from a source fs.FS to a destination filesystem.FileSystem, preserving structure and contents.

func CopyPartitionRaw

func CopyPartitionRaw(d *disk.Disk, from, to int) error

CopyPartitionRaw copies raw data from one partition to another and verifies the copy.

func NewLimitWriter

func NewLimitWriter(w io.Writer, n int64) io.Writer

NewLimitWriter creates a new LimitedWriter.

Types

type LimitedWriter

type LimitedWriter struct {
	W io.Writer // underlying writer
	N int64     // max bytes remaining
}

LimitedWriter writes to W but limits the total amount of data written to N bytes. Each call to Write updates N to reflect the new amount remaining.

func (*LimitedWriter) Write

func (l *LimitedWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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