split

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package split is a copy of the internal code from the zarf package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReassembleFile

func ReassembleFile(src, dest string) (err error)

ReassembleFile takes a directory containing split files, reassembles those files into the destination, then the split files.

func SplitFile

func SplitFile(ctx context.Context, srcPath string, chunkSize int) (_ string, err error)

SplitFile splits a file into several parts and returns the path to part000 part000 always holds the splitFileMetadata. The remaining parts hold a chunkSize number of bytes of the original file.

Types

type SplitFileMetadata

type SplitFileMetadata struct {
	// The sha256sum of the file
	Sha256Sum string
	// The size of the file in bytes
	Bytes int64
	// The number of parts the file is split into
	Count int
}

SplitFileMetadata contains info about a split file.

Jump to

Keyboard shortcuts

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