Documentation ¶
Index ¶
- type AppImage
- func (ai AppImage) ExtractFile(filepath string, destinationdirpath string, resolveSymlinks bool) error
- func (ai AppImage) ExtractFileReader(filepath string) (io.ReadCloser, error)
- func (ai AppImage) Icon() (io.ReadCloser, string, error)
- func (ai AppImage) ModTime() time.Time
- func (ai AppImage) Thumbnail() (io.ReadCloser, error)
- func (ai AppImage) Type() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppImage ¶
type AppImage struct { //Desktop is the AppImage's main .desktop file parsed as an ini.File. Desktop *ini.File Path string // updateInformation string TODO: add update stuff Name string Version string // contains filtered or unexported fields }
AppImage handles AppImage files.
func NewAppImage ¶
NewAppImage creates an AppImage object from the location defined by path. Returns an error if the given path is not an appimage, or is a temporary file. In all instances, will still return the AppImage.
func (AppImage) ExtractFile ¶
func (ai AppImage) ExtractFile(filepath string, destinationdirpath string, resolveSymlinks bool) error
ExtractFile extracts a file from from filepath (which may contain * wildcards) in an AppImage to the destinationdirpath.
If resolveSymlinks is true, if the filepath specified is a symlink, the actual file is extracted in it's place. resolveSymlinks will have no effect on absolute symlinks (symlinks that start at root).
func (AppImage) ExtractFileReader ¶
func (ai AppImage) ExtractFileReader(filepath string) (io.ReadCloser, error)
ExtractFileReader tries to get an io.ReadCloser for the file at filepath. Returns an error if the path is pointing to a folder. If the path is pointing to a symlink, it will try to return the file being pointed to, but only if it's within the AppImage.
func (AppImage) Icon ¶
func (ai AppImage) Icon() (io.ReadCloser, string, error)
Icon tries to get a io.ReadCloser for the icon dictated in the AppImage's desktop file. Returns the ReadCloser and the file's name (which could be useful for decoding).
func (AppImage) ModTime ¶
ModTime is the time the AppImage was edited/created. If the AppImage is type 2, it will try to get that information from the squashfs, if not, it returns the file's ModTime.