Filesystem access for apps
Each application has access to its own working directory in the filesystem on a BlackBerry 10 device. The application may also have access the shared folders on the device.
The working directory is where application is started, and is referred sometimes referred to as the current directory. Access to files and folders is governed by UNIX-style groups and permissions. Virtual folders are visible from the QNX Momentics IDE in the Target File System Navigator view.
|Folder location||File Path on target|
|Developer (The developer devuser home location to access your target system)||/accounts/devuser|
|System||The entire filesystem (/)|
Applications cannot create new directories in it's 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 as shown in the Target File System Navigator:
|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 10 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 folder that contains 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/protected_media||Contains the wallpapers which are provided with the device. Applications do not have access to the contents of this folder.|
|shared/videos||Videos that can be shared among applications|
|shared/voice||Audio recordings that can be shared among applications|