AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

Add static appimage get type #112

Closed azubieta closed 5 years ago

azubieta commented 5 years ago

Adds an static version of AppImage::getFormat.

This is useful for the case in which such method is used only to test whether a given file is an AppImage or not.

TheAssassin commented 5 years ago

Isn't that a bit redundant? I thought we already had a getType or so.

azubieta commented 5 years ago

Isn't that a bit redundant? ? I thought we already had a getType or so

We do have AppImageFormat getFormat() const;, but it's not 'static' and requires an 'AppImage' object to be created. Which is unpractical in the case where only we want to test where a given file is an AppImage or not.

This also implies a performance improvement on appimage_get_type which relies on this feature. In the current implementation it has to create/allocate an AppImage instance just to get the type value.

TheAssassin commented 5 years ago

Thanks!

azubieta commented 5 years ago

Mind to spin a new release for appimaged to receive this changes.

probonopd commented 5 years ago

Mind to spin a new release for appimaged to receive this changes.

This is why a want a monorepo, to avoid this kind of manual work that is annoying me.