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
New Developer
killerspaz
Posts: 199
Registered: ‎12-29-2010
My Device: Not Specified

Re: Application sandbox file system layout

Ah, didn't know they were symlinked... that makes a bit more sense....

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Application sandbox file system layout

The "shared" is link to common location where all apps share files. It has the following structure:

 

  • music 
  • videos 
  • documents 
  • clipboard 
  • bookmarks 
  • books 
  • misc 
  • voice

So from Peter's analysis, we currently have no way to get to the other directories (other than "documents")?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Application sandbox file system layout

Correct, unless you just use a relative path, which is what I'm doing temporarily (until we get a fixed SDK or see how it is on the real hardware):

 

 

File.documentsDirectory.resolvePath('../voice/myfile.wav')

 This has the advantage of being likely to continue working on the real thing, even if I don't get around to doing an update before someone else tries the app.

 


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!
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Application sandbox file system layout

I'd like to note that one of my earlier posts describing the mapping from File.xxxxxDirectory names to actual folders in the filesystem was incorrect.

 

Although I later corrected that information when 0.9.3 came out, it appears the change was not yet applied to the "official" documentation that captured that information. 

 

I've added a comment describing the issue and including the correct information.  I've confirmed that particular mapping is correct for 0.9.2, 0.9.3, 0.9.4, and 1.0.

 

(The mistake involved swapping where File.userDirectory and File.desktopDirectory pointed.  If you use either of those and might be relying on the older, incorrect information, please review and fix your code.)


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!
Please use plain text.
Developer
XoomMan
Posts: 128
Registered: ‎03-18-2011
My Device: PlayBook
My Carrier: verizon

Re: Application sandbox file system layout

Hi Peter,

 

How did you confirmed the mapping for version 1.0? Is version 1.0 available?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Application sandbox file system layout

[ Edited ]

XoomMan, it's available to people who work for RIM and QNX, at least.  I know no one who has it, outside of that group.

 

My "source" does have access to 1.0 and pointed out that that knowledge base article was wrong for 1.0, and then we compared with the other versions and verified things.

 

I'm not actually certain I was wrong with the original 0.9.2 stuff, come to think of it.  I retested before posting, but used SDK 0.9.4 for the build, running it on the old simulator.  I'll retest with an 0.9.2 build just to tie up that loose end too.  The actual mapping is supposed to come from /etc/system/config/qnxair.conf, which is the same in each simulator I've checked today, but possibly the older SDK didn't correctly read those values.  Most likely I just screwed up.

 

(Addendum: I tried various combinations of 0.9.1 and 0.9.2 SDK and simulator, and can't find one that gives the combination I originally posted... chalk it up to pilot error.  My bad, pure and simple.)


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!
Please use plain text.