Filesystem access for apps

Each application has access to its own working directory in the filesystem on a BlackBerry PlayBook tablet. The application may also have access the shared folders on the device.

The working directory is where application is started, and is also known as the current directory and the sandbox. Access to files and folders is governed by UNIX-style groups and permissions. For more information, see File ownership and permissions in the Working with Files chapter of the QNX Neutrino User's Guide.

Applications cannot create new directories in the working directory; they can only access the folders listed below. To access shared folders, the capability access_shared must be specified in the BAR application descriptor file.

All path references in your application are relative to the root of the working folder.

The following table describes the folders that an application can access:

This folder: Contains:
app Files that were installed with your application. These files were packaged with your BAR file. Your application has read-only access to this folder
db Files and database used by the application
data The application's private data. The application has full access to read and write files in this folder. You can use the $HOME environment variable to easily refer to this folder
tmp The application's temporary working files. The application should remove these files regularly. The BlackBerry Tablet OS might remove these files any time that the application isn't running
logs System logs for an application. The application's stderr and stdout are redirected to this directory
shared Subfolders that contain shared data grouped by type. An application cannot write to this directory
shared/books EBook files that can be shared among applications
shared/camera The camera roll that can be shared among applications. The camera roll contains recordings or images taken by an application with the camera
shared/documents Documents that can be shared among applications
shared/downloads Web browser downloads
shared/misc Miscellaneous data that can be shared among applications
shared/music Music files that can be shared among applications
shared/photos Photos that can be shared among applications
shared/print The printed files that can be shared among applications
shared/videos Videos that can be shared among applications
shared/voice Audio recordings that can be shared among applications