Documentation ¶
Index ¶
- func BustGhosts(params *BustGhostsParams) error
- func ContainerPaths(container *tlc.Container) []string
- func Difference(a []string, b []string) []string
- func DotItchFilter() tlc.FilterFunc
- func Exists(path string) bool
- func Mkdir(path string) error
- func SliceToLength(a []string, length int) []string
- func StartAsymptoticProgress(consumer *state.Consumer, cancel chan struct{})
- func Walk(path string) (*tlc.Container, error)
- type BustGhostsParams
- type DirTree
- type Receipt
- type SaveAngelsFunc
- type SaveAngelsParams
- type SaveAngelsResult
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BustGhosts ¶
func BustGhosts(params *BustGhostsParams) error
*
- A ghost busting is performed after performing an install using a method
- that lets us know exactly what was written to disk. *
- In this case, we:
- - Install in-place, directly into the destination
- - Compare the previous list of installed files with the list
- of files we just wrote to disk
- - Remove all the ghosts *
- Ghosts are files that were in the previous install and aren't present
- in the new install. Since we don't want to keep old, unnecessary files
- (that aren't angels) around, we just remove them. *
- See also: save angels.
func ContainerPaths ¶
ContainerPaths returns a list of all paths in a container, for all files and symlinks. Folders are excluded
func Difference ¶
Return elements in b that aren't in a
func DotItchFilter ¶
func DotItchFilter() tlc.FilterFunc
func SliceToLength ¶
func StartAsymptoticProgress ¶
Types ¶
type BustGhostsParams ¶
type DirTree ¶
type DirTree struct {
// contains filtered or unexported fields
}
func NewDirTree ¶
func (*DirTree) CommitFiles ¶
func (*DirTree) EnsureParents ¶
EnsureParents makes sure that all the parent directories of a given path exist
func (*DirTree) ListRelativeDirs ¶
ListRelativeDirs returns a list of directories in this tree, relative to the tree's base path, depth first
type Receipt ¶
type Receipt struct { Game *itchio.Game `json:"game"` Upload *itchio.Upload `json:"upload"` Build *itchio.Build `json:"build"` Files []string `json:"files"` InstallerName string `json:"installerName"` // optional, installer-specific fields MSIProductCode string `json:"msiProductCode,omitempty"` }
func ReadReceipt ¶
func (*Receipt) WriteReceipt ¶
type SaveAngelsFunc ¶
type SaveAngelsFunc func() error
type SaveAngelsParams ¶
type SaveAngelsResult ¶
type SaveAngelsResult struct {
Files []string
}
func SaveAngels ¶
func SaveAngels(params *SaveAngelsParams, innerTask SaveAngelsFunc) (*SaveAngelsResult, error)
*
- An angel redemption is performed when we need to run arbitrary installers
- that do not report which files they wrote. *
- Conceptually:
- - We rename the existing folder to a temporary folder
- - We install to a fresh folder
- - We merge angels with the fresh folder
- - We clean up the temporary folder *
- Angels are files that have been written by the game (like configurations
- or save files) or the user (by applying a mod manually, for example)
- They're not part of a fresh installation of the previous version,
- but we do want to keep them around. *
- See also: bust ghosts.
Click to show internal directories.
Click to hide internal directories.