write

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWriteNotSafe        = errors.New("destination may already be in use")
	ErrUnknownOutputFormat = errors.New("unknown output format")
)

Functions

func SetModTime

func SetModTime(path, reference string) error

SetModTime sets the modification time of path to the same as reference.

Types

type Files

type Files map[string][]string

Files is a map of produced file paths to a list of special attributes such as "dir" or "ghost".

func (Files) Descriptor

func (written Files) Descriptor(
	descriptor *descriptor.Descriptor,
	prefix, radical, reference string,
) error

Descriptor creates a new packed module description file.

func (Files) Dir

func (written Files) Dir(prefix, path, reference string) error

Dir creates a new directory.

func (Files) File

func (written Files) File(
	reader io.Reader,
	prefix, radical, extension, reference string,
	overwrite bool,
) error

File creates a new file.

func (Files) Format

func (written Files) Format(format string) (string, error)

Format returns the formatted representation of the written files.

func (Files) Hash

func (written Files) Hash(prefix, radical string) error

Hash creates a new packed module hash file.

func (Files) Info

func (written Files) Info(info *version.Version, prefix, radical, reference string) error

Info creates a new module info file.

func (Files) JSON

func (written Files) JSON() (string, error)

JSON returns a JSON representation of the written files.

func (Files) Output

func (written Files) Output(file, format string) error

Output writes the formatted representation of the written files to a file.

func (Files) Pack

func (written Files) Pack(mod *files.Files, prefix, destination string) error

Pack creates a packed module.

func (Files) RPM

func (written Files) RPM() string

RPM returns an RPM representation of the written files.

func (written Files) Symlink(prefix, path, target, reference string) error

Symlink creates a new symbolic link.

func (Files) Text

func (written Files) Text(prefix string, special bool) string

Text returns a text representation of the written files.

func (Files) Zip

func (written Files) Zip(module *files.Files, prefix, radical string) error

Zip creates a new packed module zip file.

Jump to

Keyboard shortcuts

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