Class AppImage

Class Documentation

class appimage::core::AppImage

An object of class <appimage> represents an existent AppImage file. Provides readonly methods to access the AppImage information and contained files.

Public Functions

explicit AppImage(const std::string &path)

Open the AppImage at <path>.

Parameters

path

Throws

AppImageError – if something goes wrong

AppImage(const AppImage &other)

Creates an AppImage instance from <other> AppImage

Parameters

other

AppImage &operator=(const AppImage &other)

Copy the <other> instance data into the current one.

Parameters

other

Returns

virtual ~AppImage()

Default destructor.

Required by std::shared_ptr to work properly.

const std::string &getPath() const
Returns

AppImage file path

AppImageFormat getFormat() const

Inspect the magic bytes of the file to guess the AppImage <FORMAT>

Returns

AppImage <FORMAT>

off_t getPayloadOffset() const

Calculate the offset in the AppImage file where is located the payload file system.

Returns

offset where the payload filesystem is located.

PayloadIterator files() const

Provides a one way iterator to traverse and access the files contained inside the AppImage.

Throws

AppImageError – if something goes wrong

Returns

a files_iterator instance

bool operator==(const AppImage &rhs) const

Compare this to <rhs>

Parameters

rhs

Returns

true if both are equal, false otherwise

bool operator!=(const AppImage &rhs) const

Compare this to <rhs>

Parameters

rhs

Returns

true if they are different, false otherwise

Public Static Functions

static AppImageFormat getFormat(const std::string &path)

Inspect the magic bytes of the file to guess the AppImage <FORMAT>

Returns

AppImage <FORMAT>