How can I unzip a local data file using RhoMobile

161 Views Asked by At

I am writing an app using RhoMobile.

There seems to be some permissions problem since System.unzip_file is not producing any results. My zip files is distributed with my app in the public folder. I am not able to unzip it at runtime though.

Any ideas?

1

There are 1 best solutions below

0
On

Make sure you have the correct local path to the zip file. Use the local file access methods detailed here.

For example, you may do something like:

path_to_public = Rho::RhoApplication::get_public_folder  # this would return something like /path/to/public
path_to_zip = "#{path_to_public}/file.zip"