dirtree

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobAccessForDirTree

func BlobAccessForDirTree(path string, opts ...Option) (_ bpi.BlobAccess, rerr error)

func BlobAccessProviderForDirTree

func BlobAccessProviderForDirTree(path string, opts ...Option) bpi.BlobAccessProvider

func DataAccessForDirTree

func DataAccessForDirTree(path string, opts ...Option) (bpi.DataAccess, error)

Types

type Option

type Option = optionutils.Option[*Options]

func WithCompressWithGzip

func WithCompressWithGzip(b ...bool) Option

func WithExcludeFiles

func WithExcludeFiles(files []string) Option

func WithFileSystem

func WithFileSystem(fs vfs.FileSystem) Option
func WithFollowSymlinks(b ...bool) Option

func WithIncludeFiles

func WithIncludeFiles(files []string) Option

func WithMimeType

func WithMimeType(mime string) Option

func WithPreserveDir

func WithPreserveDir(b ...bool) Option

type Options

type Options struct {
	// FileSystem defines the file system that contains the specified directory.
	FileSystem vfs.FileSystem
	MimeType   string
	// CompressWithGzip defines whether the specified directory should be compressed.
	CompressWithGzip *bool `json:"compress,omitempty"`
	// PreserveDir defines that the specified directory should be included in the blob.
	PreserveDir *bool `json:"preserveDir,omitempty"`
	// IncludeFiles is a list of shell file name patterns that describe the files that should be included.
	// If nothing is defined, all files are included.
	IncludeFiles []string `json:"includeFiles,omitempty"`
	// ExcludeFiles is a list of shell file name patterns that describe the files that should be excluded from the resulting tar.
	// Excluded files always overwrite included files.
	ExcludeFiles []string `json:"excludeFiles,omitempty"`
	// FollowSymlinks configures to follow and resolve symlinks when a directory is tarred.
	// This options will include the content of the symlink directly in the tar.
	// This option should be used with care.
	FollowSymlinks *bool `json:"followSymlinks,omitempty"`
}

func (*Options) ApplyTo

func (o *Options) ApplyTo(opts *Options)

Jump to

Keyboard shortcuts

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