← Back to team overview

ubuntu-phone team mailing list archive

Re: Using a zip file?

 

On 02/05/2014 10:50 AM, Sam Bull wrote:
> I want to include some data with my app. It is a zip file about 15MB in
> size, uncompressed the files are about 40MB. So, it would be nice to
> keep it as compressed file.
> 
> Can click packages extract a file and save it somewhere appropriate when
> installing to the phone?

Yes, applications have write access to a number of areas that are app specific
and based on XDG. 'Runtime environment' under the developer docs[1] has the
information you need for where to put things.

> If not, is there an easy way to access the contents of a compressed file
> in QML/Javascript?

This actually isn't 'if not'-- while you have the write access, pure QML
applications don't have filesystem access without the help of a (C++) extension,
and I don't think there is an extension for uncompressing/compressing files, so
you might have to write one for your app. Perhaps someone from the SDK team can
comment on any plans or existing extensions for this sort of thing.

[1]http://developer.ubuntu.com/publish/apps/security-policy-for-click-packages/

-- 
Jamie Strandboge                 http://www.ubuntu.com/

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References