Documentation
¶
Overview ¶
Package file provides file manipulation and processing utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromPath ¶
FromPath from a file or dir path returns an array of flat file paths. pattern is a filepath.Match pattern to limit files to a pattern
func UnTar ¶
UnTar untars a tar or tgz file into the dest folder. dest is the folder location io.Reader is a reader that is tar (or compressed tar) format compressed is true if reader is a compressed format
func UntarInPlace ¶
UntarInPlace untars a .tar file using the same name as the file as the sub-folder name in the folder it was referenced in. i.e., /opt/foo.tar will land in /opt/foo supports tar and tgz file formats
Types ¶
type Info ¶
type Info struct {
Type Type
// Error is set for TypeUnknown objects and describes the reason.
Error error
BaseName string
FullName string
// HasIndex is true when the file name starts with a valid index.
HasIndex bool
Index int64
StepName string
IsTemplate bool
}
Info contains parsed information about a test file name.
type Type ¶
type Type int
Type represents the type of a test file.
const ( // TypeUnknown means it was not possible to determine the type of file, e.g. unrecognized name pattern. TypeUnknown Type = iota // TypeApply denotes files with resources to apply on the cluster. TypeApply // TypeAssert denotes assertion files. Must match for the step to pass. TypeAssert // TypeError denotes negative assertion files. Must not match for the step to pass. TypeError )