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

Native Development

Posts: 27
Registered: ‎09-03-2012
My Device: Blackberry Playbook
My Carrier: None
Accepted Solution

Access files on the playbook

Apologies for the simple question; I've dug around the documentation but cant find a clear answer.


I want to copy some files (via usb) onto the playbook, lets say I copy a directory MyInfo to the top level folder of my playbook from a PC, the folder contains:

  • a txt file 
  • a jpg 
  • and an mp3 file

From an app written using the Native SDK, can I see the directory and 3 files within it? or can I only access mp3 files through a shared/music directory (so lose all info about the directory and not see the other 2 files with it)


many thanks


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

Re: Access files on the playbook

[ Edited ]

This and surrounding docs should answer many of your questions: https://developer.blackberry.com/native/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.doc.na...


You mention "top level folder", but note that no app can write either to the root folder (i.e. to / ) nor can they write to the top-level shared folder.  They can write only to their own ./data folder or, with the correct permission specified (access_shared) to the subfolders of shared/.


But to answer the specific question, with access_shared specified, your app can definitely access all the files under shared, even if they are music files that are written outside of the shared/music directory.  You could say that most of those folders exist to serve various system purposes, but a given app can do something different if it wants.  In some cases that may mean giving up certain system functionality, but presumably that's a choice you would make one a case-by-case basis once you understand the system better.

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!
Posts: 27
Registered: ‎09-03-2012
My Device: Blackberry Playbook
My Carrier: None

Re: Access files on the playbook

many thanks Peter