write

package
v0.0.0-...-5c4efe0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func SetModTime

func SetModTime(path string, reference string) (err error)

Sets the modification time of path to the same as reference

Types

type Files

type Files map[string][]string

A map of produced file paths to a list special attributes such as "dir": the result is a directory "ghost": the result file content will need to be recomputed on installation

func (Files) Descriptor

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

Create a new packed module description file

func (Files) Dir

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

Create a new directory reference is something that will be taken as modification time reference It is provided as a convenience, sicne writing anything in the directory will change its mtime; a saparate SetModTime call is usually necessary

func (Files) File

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

Create a new file radical is the target path without extension reference is something that will be taken as modification time reference

func (Files) Format

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

func (Files) Hash

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

Create a new packed module Hash file

func (Files) Info

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

Create a new module info file

func (Files) JSON

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

func (Files) Output

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

func (Files) Pack

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

func (Files) RPM

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

Create a new symbolic link reference is something that will be taken as modification time reference

func (Files) Text

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

func (Files) Zip

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

Create a new packed module zip file

Jump to

Keyboard shortcuts

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