Documentation ¶
Overview ¶
Package tlc is a generated protocol buffer package.
It is generated from these files:
tlc/tlc.proto
It has these top-level messages:
Container Dir File Symlink
Index ¶
- Constants
- Variables
- type Container
- func (c *Container) AssertCaseInsensitiveSafe() error
- func (c *Container) Clone() *Container
- func (*Container) Descriptor() ([]byte, []int)
- func (c1 *Container) EnsureEqual(c2 *Container) error
- func (c *Container) FixPermissions(pool lake.Pool) error
- func (c *Container) ForEachEntry(f func(e Entry) ForEachOutcome)
- func (container *Container) Format(f fmt.State, c rune)
- func (m *Container) GetDirs() []*Dir
- func (m *Container) GetFiles() []*File
- func (m *Container) GetSymlinks() []*Symlink
- func (container *Container) IsSingleFile() bool
- func (c *Container) Prepare(basePath string) error
- func (container *Container) Print(output WriteLine)
- func (*Container) ProtoMessage()
- func (m *Container) Reset()
- func (container *Container) Stats() string
- func (m *Container) String() string
- func (container *Container) Validate() error
- type Dir
- type Entry
- type File
- type FilterFunc
- type FilterResult
- type ForEachOutcome
- type Symlink
- func (*Symlink) Descriptor() ([]byte, []int)
- func (s *Symlink) GetMode() uint32
- func (s *Symlink) GetPath() string
- func (*Symlink) ProtoMessage()
- func (m *Symlink) Reset()
- func (s *Symlink) SetMode(mode uint32)
- func (s *Symlink) SetPath(path string)
- func (m *Symlink) String() string
- func (f *Symlink) ToString() string
- type WalkOpts
- type WriteLine
Constants ¶
const ( ForEachContinue = 1 ForEachBreak = 2 )
const ( // ModeMask is or'd with files being diffed ModeMask = 0o644 // NullPath can be specified instead of a directory to yield an empty container NullPath = "/dev/null" )
Variables ¶
var (
ErrUnrecognizedContainer = errors.New("Unrecognized container: should either be a directory, or a .zip archive")
)
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Files []*File `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"` Dirs []*Dir `protobuf:"bytes,2,rep,name=dirs" json:"dirs,omitempty"` Symlinks []*Symlink `protobuf:"bytes,3,rep,name=symlinks" json:"symlinks,omitempty"` Size int64 `protobuf:"varint,16,opt,name=size" json:"size,omitempty"` }
func WalkAny ¶
WalkAny tries to retrieve container information on containerPath. It supports: the empty container (/dev/null), local directories, zip archives, or single files
func WalkSingle ¶
WalkSingle returns a container with a single file
func WalkZip ¶
WalkZip walks all file in a zip archive and returns a container Note: WalkZip does not respect filter
func (*Container) AssertCaseInsensitiveSafe ¶
AssertCaseInsensitiveSafe returns an error if there exists multiple entries that differ only by their casing, like `foo/bar` and `foo/BAR`
func (*Container) Descriptor ¶
func (*Container) EnsureEqual ¶
func (*Container) ForEachEntry ¶
func (c *Container) ForEachEntry(f func(e Entry) ForEachOutcome)
ForEachEntry iterates through all entries of a container Return `true` to break
func (*Container) GetSymlinks ¶
func (*Container) IsSingleFile ¶
IsSingleFile returns true if the container contains exactly one files, and no directories or symlinks.
func (*Container) Prepare ¶
Prepare creates all directories, files, and symlinks. It also applies the proper permissions if the files already exist
func (*Container) ProtoMessage ¶
func (*Container) ProtoMessage()
type Dir ¶
type Dir struct { Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"` Mode uint32 `protobuf:"varint,2,opt,name=mode" json:"mode,omitempty"` }
func (*Dir) Descriptor ¶
func (*Dir) ProtoMessage ¶
func (*Dir) ProtoMessage()
type File ¶
type File struct { Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"` Mode uint32 `protobuf:"varint,2,opt,name=mode" json:"mode,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"` Offset int64 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"` }
func (*File) Descriptor ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type FilterFunc ¶
type FilterFunc func(name string) FilterResult
A FilterFunc allows ignoring certain files or directories when walking the filesystem When a directory is ignored by a FilterFunc, all its children are, too!
var KeepAllFilter FilterFunc = func(name string) FilterResult { return FilterKeep }
KeepAllFilter is a passthrough that filters out no files at all
var PresetFilter FilterFunc = func(name string) FilterResult { for _, pattern := range baseIgnoredPaths { match, _ := filepath.Match(pattern, name) if match { return FilterIgnore } } return FilterKeep }
PresetFilter is a base filter that ignores git/hg/svn metadata, some macOS and Windows metadata, and the `.itch` folder
type FilterResult ¶
type FilterResult int
const ( FilterKeep FilterResult = 1 FilterIgnore FilterResult = 2 )
type ForEachOutcome ¶
type ForEachOutcome int
type Symlink ¶
type Symlink struct { Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"` Mode uint32 `protobuf:"varint,2,opt,name=mode" json:"mode,omitempty"` Dest string `protobuf:"bytes,3,opt,name=dest" json:"dest,omitempty"` }
func (*Symlink) Descriptor ¶
func (*Symlink) ProtoMessage ¶
func (*Symlink) ProtoMessage()
type WalkOpts ¶
type WalkOpts struct { // "Wrapping" solves the problem where we're walking: // /foo/bar/Sample.app // But we want all files, dirs and symlinks in the container to start with "Sample.app/". // // What we do is we adjust the walked path to: // /foo/bar // And we set `WrappedDir` to `Sample.app`. // // This is only used by `WalkDir`. It behaves as if the `/foo/bar` directory // only contained `Sample.app`, and nothing else. WrappedDir string // Filter decides which files to exclude from the walk Filter FilterFunc // Dereference walks symlinks as if they were their targets Dereference bool }
func (*WalkOpts) GetFilter ¶
func (opts *WalkOpts) GetFilter() FilterFunc