filelist

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lists

type Lists struct {
	Files    []string
	Symlinks []string
	Dirs     []string
}

Lists is a structure holding relative paths to files, symlinks and directories. The members of this structure can be later combined with common.MapFilesToDirectories to get some meaningful paths.

func (*Lists) GenerateFilelist

func (list *Lists) GenerateFilelist(out io.Writer) error

GenerateFilelist generates a filelist, duh. And writes it to a given writer. The format of generated file is described in filelist.ParseFilelist.

func (*Lists) ParseFilelist

func (list *Lists) ParseFilelist(filelist io.Reader) error

ParseFilelist parses a given filelist. The filelist format is rather simple: <BLOCK> <BLOCK> ...

Where "<BLOCK>" is as follows: <HEADER> <LIST>

Where "<HEADER>" is as follows: <KIND> (<COUNT>)

Where "<KIND>" is either "files", "symlinks" or "dirs" and "<COUNT>" tells how many items are in the following list. "<LIST>" is as follows: <1st ITEM> <2nd ITEM> ... <COUNTth ITEM> <EMPTY LINE>

Jump to

Keyboard shortcuts

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