Documentation ¶
Overview ¶
Package packages provides functionality to install ZIP and TAR packages.
Index ¶
- func CreateZip(zipFile, sourceDir string) error
- func Install(pkgFile, destination string) error
- func LoadMediaInfo(pkgFile string) (repository.MediaInfo, error)
- func MediaInfoFile(pkgFile string) string
- func MediaInfoForFileName(fileName string) repository.MediaInfo
- func SaveMediaInfo(pkgFile string, mediaInfo repository.MediaInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateZip ¶
CreateZip creates a package from the files in the source directory. The created package is a Zip file.
func Install ¶
Install installs a package in the given destination. If the package is a TAR or ZIP archive, the destination becomes a directory where the archive content is extracted. Otherwise, the destination is hard-linked to the package (or copied if hard link is not possible).
func LoadMediaInfo ¶
func LoadMediaInfo(pkgFile string) (repository.MediaInfo, error)
LoadMediaInfo returns the MediaInfo for the given package file.
func MediaInfoFile ¶
MediaInfoFile returns the name of the file where the media info is stored for the given package file.
func MediaInfoForFileName ¶
func MediaInfoForFileName(fileName string) repository.MediaInfo
MediaInfoForFileName returns the MediaInfo based on the file's extension.
func SaveMediaInfo ¶
func SaveMediaInfo(pkgFile string, mediaInfo repository.MediaInfo) error
SaveMediaInfo saves the media info for a package.
Types ¶
This section is empty.