fstest

package
v0.0.0-...-1d70491 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileContents

func FileContents(archive *Archive, f *File) []byte

func FsFromArchive

func FsFromArchive(a *Archive) (billy.Filesystem, error)

func FsFromPath

func FsFromPath(fsPath string) (billy.Filesystem, error)

func FsFromTxtarFile

func FsFromTxtarFile(pathToFile string) (billy.Filesystem, error)

func Rootify

func Rootify(path string) string

Types

type Archive

type Archive struct {
	// contains filtered or unexported fields
}

func EmptyArchive

func EmptyArchive() *Archive

func FsToArchive

func FsToArchive(f billy.Filesystem) (*Archive, error)

func ParseArchive

func ParseArchive(data []byte) *Archive

func (*Archive) Add

func (a *Archive) Add(f *File)

func (*Archive) Exists

func (a *Archive) Exists(path string) bool

func (*Archive) Files

func (a *Archive) Files() <-chan *File

func (*Archive) Format

func (a *Archive) Format() []byte

func (*Archive) Get

func (a *Archive) Get(path string) *File

type File

type File struct {
	txtar.File
}

func NewFile

func NewFile(name string, data []byte) *File

Jump to

Keyboard shortcuts

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