exportlib

package
v0.19.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package exportlib defines common plumbing for exporting file trees into archives and other filesystems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root         string    // prefix output paths with this directory
	IncludeXAttr bool      // include extended attributes, if possible
	OmitStat     bool      // omit permissions and modification times
	Update       bool      // update or replace existing targets
	DebugOutput  io.Writer // write detailed debug output here
}

Config carries shared settings for exporting file trees from a store. A zero value is ready for use.

func (Config) ExportToOS

func (c Config) ExportToOS(ctx context.Context, tree *filetree.PathInfo) error

ExportToOS recursively exports the contents of tree into the specified root in the native filesystem. It will report an error if c.Root == "".

func (Config) ExportToTar

func (c Config) ExportToTar(ctx context.Context, tree *filetree.PathInfo, tw *tar.Writer) error

ExportToTar recursively exports the contents of tree to tw.

func (Config) ExportToZIP

func (c Config) ExportToZIP(ctx context.Context, tree *filetree.PathInfo, zw *zip.Writer) error

ExportToZIP recursively exports the contents of tree into zw.

Jump to

Keyboard shortcuts

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