Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
Name string
Path string
TypeFlag byte
Linkname string
Data []byte // Data contains actual data in the file.
Size int64
Mode os.FileMode
Uid int
Gid int
IsDir bool
}
FileInfo contains tar metadata for a specific FileNode.
func NewFileInfoFromTarHeader ¶
NewFileInfoFromTarHeader extracts the metadata from a tar header and file contents.
type FileNode ¶
type FileNode struct {
Tree *FileTree
Parent *FileNode
Name string
Info *FileInfo
Children map[string]*FileNode
}
FileNode represents a single file or directory.
func NewFileNode ¶
NewFileNode creates a new FileNode relative to the given parent node with a payload.
type FileTree ¶
type FileTree struct {
Root *FileNode
LayerName string
WhiteoutFiles []*WhiteoutFile
}
func (*FileTree) FindNodeFromPath ¶
FindNodeFromPath returns FileNode specified by the path. If not exist, it returns nil.
type WhiteoutFile ¶
type WhiteoutFile struct {
Name string
OriginalName string
FileInfo *FileInfo
WhiteoutType WhiteoutType
}
func NewWhiteoutFile ¶
func NewWhiteoutFile(name string, info *FileInfo) *WhiteoutFile
type WhiteoutType ¶
type WhiteoutType int
const ( WhiteoutTypeBasic WhiteoutType = iota WhiteoutTypeLinkDir WhiteoutTypeOpaqueDir WhiteoutTypeOtherMetaPrefix )
Click to show internal directories.
Click to hide internal directories.