filecollector

package
v0.2.62 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyCollector

type CopyCollector struct {
	DstDir string
}

func (*CopyCollector) WriteFile

func (cc *CopyCollector) WriteFile(fpath string, fi fs.FileInfo, linkName string, f io.Reader) error

type DefaultFs

type DefaultFs struct {
}

func (*DefaultFs) Open

func (*DefaultFs) Open(path string) (io.ReadCloser, error)

func (*DefaultFs) OpenGitIndex

func (*DefaultFs) OpenGitIndex(path string) (*index.Index, error)
func (*DefaultFs) Readlink(path string) (string, error)

func (*DefaultFs) Walk

func (*DefaultFs) Walk(root string, fn filepath.WalkFunc) error

type FileCollector

type FileCollector struct {
	Ignorer   gitignore.Matcher
	SrcPath   string
	SrcPrefix string
	Fs        Fs
	Handler   Handler
}

func (*FileCollector) CollectFiles

func (fc *FileCollector) CollectFiles(ctx context.Context, submodulePath []string) filepath.WalkFunc

type Fs

type Fs interface {
	Walk(root string, fn filepath.WalkFunc) error
	OpenGitIndex(path string) (*index.Index, error)
	Open(path string) (io.ReadCloser, error)
	Readlink(path string) (string, error)
}

type Handler

type Handler interface {
	WriteFile(path string, fi fs.FileInfo, linkName string, f io.Reader) error
}

type TarCollector

type TarCollector struct {
	TarWriter *tar.Writer
	UID       int
	GID       int
	DstDir    string
}

func (TarCollector) WriteFile

func (tc TarCollector) WriteFile(fpath string, fi fs.FileInfo, linkName string, f io.Reader) error

Jump to

Keyboard shortcuts

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