Documentation ¶
Index ¶
- func CleanDevice(str string) string
- func CleanDevices(s []string) []string
- func CleanFile(str string) string
- func CleanFiles(s []string) []string
- func CommandExists(str string) (string, bool)
- func Contains(s []string, str string) (int, bool)
- func ContainsAny(s []string, s2 []string) (int, bool)
- func DirExists(path string) bool
- func ExpandDir(str string) string
- func ExtractResource(aiPath string, src string, dest string) error
- func ExtractResourceReader(aiPath string, src string) (io.ReadCloser, error)
- func FileExists(path string) bool
- func GetAppImageType(src string) (int, error)
- func GetOffset(src string) (int, error)
- func GetWorkDir() (string, error)
- func HasMagic(r io.ReadSeeker, str string, offset int) bool
- func MakeTemp(path string, name string) (string, error)
- func RandString(seed int, length int) string
- func ReadUpdateInfo(src string) (string, error)
- func RealHome() (string, error)
- func SplitKey(str string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanDevice ¶
func CleanDevices ¶
func CleanFiles ¶
func CommandExists ¶
Returns full path of command and true if in PATH or working directory
func ContainsAny ¶
Checks if an array contains any of the elements from another array
func ExpandDir ¶
Expand xdg and shorthand directories into either real directories on the user's machine or some generic names to be used to protect the actual path names in case the user has changed them
func ExtractResourceReader ¶
func ExtractResourceReader(aiPath string, src string) (io.ReadCloser, error)
func FileExists ¶
Returns true if any kind of file (including dirs) exists at `path`
func GetAppImageType ¶
Find the type of AppImage Returns strings either `1` for ISO disk image AppImage, `2` for type 2 SquashFS AppImage, `0` for unknown valid ELF or `-2` for shell script SquashFS AppImage (shappimage)
func GetOffset ¶
GetOffset takes an AppImage (either ELF or shappimage), returning the offset of its SquashFS archive
func HasMagic ¶
func HasMagic(r io.ReadSeeker, str string, offset int) bool
Checks the magic of a given file against the byte array provided if identical, return true
func RandString ¶
func ReadUpdateInfo ¶
Types ¶
This section is empty.