package filelist

import "github.com/coreos/rkt/tools/common/filelist"

Index

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>

Source Files

filelist.go

Version
v1.30.0 (latest)
Published
Apr 13, 2018
Platform
linux/amd64
Imports
7 packages
Last checked
5 days ago

Tools for package owners.