Documentation ¶
Overview ¶
Package workshop has been designed to prepare a mod directory or archive for Steam Workshop. It allows including only the essential files based on ignore list. In the future, it may also include the features to automatically publish your mod.
Index ¶
- type Controller
- type Workshop
- func (w *Workshop) AbsDestPath() string
- func (w *Workshop) AbsSrcPath() string
- func (w *Workshop) CopyFiles() error
- func (w *Workshop) CountDestItems() (int, error)
- func (w *Workshop) DestDirExists() bool
- func (w *Workshop) Files() []string
- func (w *Workshop) FilesSize() int64
- func (w *Workshop) GetFiles() ([]string, int64, error)
- func (w *Workshop) IsPathIgnored(path string) bool
- func (w *Workshop) MakeDestDir() error
- func (w *Workshop) MakeDestFile(name string) error
- func (w *Workshop) PrintFiles()
- func (w *Workshop) RelDestPath() string
- func (w *Workshop) RelSrcPath() string
- func (w *Workshop) SetIgnore(ignore []string)
- func (w *Workshop) ZipFiles() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { SetIgnore([]string) IsPathIgnored(string) bool GetFiles() ([]string, int64, error) DestDirExists() bool MakeDestDir() error MakeDestFile(string) error CopyFiles() error ZipFiles() error CountDestItems() (int, error) Files() []string FilesSize() int64 RelSrcPath() string AbsSrcPath() string RelDestPath() string AbsDestPath() string PrintFiles() }
Controller is the interface that wraps the Workshop methods.
type Workshop ¶
type Workshop struct {
// contains filtered or unexported fields
}
Workshop represents a workshop-related data.
func (*Workshop) AbsDestPath ¶
AbsDestPath gets an absolute destination path.
func (*Workshop) AbsSrcPath ¶
AbsSrcPath gets an absolute source path.
func (*Workshop) CopyFiles ¶
CopyFiles copies all files retrieved earlier using GetFiles to the destination path.
func (*Workshop) CountDestItems ¶
CountDestItems counts the total number of items within a destination directory.
func (*Workshop) DestDirExists ¶
DestDirExists checks if destination directory exists.
func (*Workshop) FilesSize ¶
FilesSize gets the total size of all files retrieved earlier using GetFiles.
func (*Workshop) GetFiles ¶
GetFiles gets a list of files and their size in total from the source path based on ignore list.
func (*Workshop) IsPathIgnored ¶
IsPathIgnored checks if the provided path is ignored.
func (*Workshop) MakeDestDir ¶
MakeDestDir makes an empty destination directory.
func (*Workshop) MakeDestFile ¶
MakeDestFile makes an empty destination file.
func (*Workshop) PrintFiles ¶
func (w *Workshop) PrintFiles()
PrintFiles prints a list of files retrieved earlier using GetFiles.
func (*Workshop) RelDestPath ¶
RelDestPath gets a relative destination path.
func (*Workshop) RelSrcPath ¶
RelSrcPath gets a relative source path.