Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 151
Registered: ‎12-06-2010
My Device: Not Specified

local folder location in simulator

When using local folders for saving files, where are these actually located when the app is simulated.

ie: where are files actually located when they are saved to the userDirectory when the app is loaded in the simulator?

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: local folder location in simulator

Assuming you "mean where does File.applicationStorageDirectory resolve to?": right now they're in a "Local Store" folder under an app-specific folder that's in the /root/.appdata folder. 

 

Of course, that's totally undocumented and I can't see any reason to assume it won't change in the next SDK or in the production version, but if you're just trying to find your files right now to analyze some issue, that should be where you find them.  Note that it appears only apps which have created local data will have a folder there.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 151
Registered: ‎12-06-2010
My Device: Not Specified

Re: local folder location in simulator

The data is there as it appears in the app after reboot. But the file itself is not.

 

I looked in the appData/Local/VMware folder but no luck.

And there is no folder that is the name of my app.

 

However when I use the app as a desktop AIR, it creates the folder just fine.

I am using Vista and am using the UserDirectory.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: local folder location in simulator

 


DachFlach wrote:

I looked in the appData/Local/VMware folder but no luck.

And there is no folder that is the name of my app.


 

Ah, you're misunderstanding.  The location I gave is in the simulator.  Not on your desktop machine, or wherever you're running the VMware player.

 

The way virtual machine stuff works, the player (VMWare, VirtualBox, etc) effectively simulates an entire computer inside your machine, complete with its own network interface, hard drive(s), screen, etc.  The hard drives are mapped to "disk image" files that are somewhere on your machine (on mine, running Windows 7, under "c:\users\myname\Document\Virtual Machines\Playbook-test").  But those are images of the complete hard drive, not something you can just CD into and examine individual files (at least, not easily...).  For example, the file Playbook-test.vmdk here (a 4GB file) is basically where the entire simulator hard drive is simulated.

 

Maybe if you can describe what you want to accomplish here, I can tell you what your options are.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 151
Registered: ‎12-06-2010
My Device: Not Specified

Re: local folder location in simulator

Ya, that is what I feared, that the working files were not accessible.

Basically, I am writing databases, image and audio files and although webcam captures and audio captures and playback is not an option in the simulator, I wanted to try and mimic the operations by placing externally created files in their places.

I could use remote files and bring them in I suppose but not worth it.

 

I guess I'll just submit the app anyways and see if it works on somebody's Real PlayBook , somewhere.

 

Thank you very much for verifying that the locally created files in the Sim, are not exchangeable with the OS. The Real OS Smiley Wink

 

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: local folder location in simulator

 


DachFlach wrote:

Basically, I am writing databases, image and audio files and although webcam captures and audio captures and playback is not an option in the simulator, I wanted to try and mimic the operations by placing externally created files in their places.


 

That's actually fairly easy to do then, if you know how to use FTP.

 

Connect to the simulator as user "root", and log in with the same as password.  I'm assuming since they did this that they really weren't interested in preventing anyone from doing that at this point...  they've had ample time to release a new SDK if they had left that open by mistake.

 

Via FTP, change to the folder I described in the earlier post.  If you're using the command line FTP, make sure you type the "binary" command once before doing any file transfers, as you're working with binary and not ASCII data.  (Type "ascii" if you want to switch back.)  I believe the graphical versions of FTP probably handle that automatically.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: local folder location in simulator

I should note that when you first connect, you'll already be in the root user's folder, so just dig down into the .appdata subfolder that you find there.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!