Table of Contents
Several means are available for an application to store data:
|file in tmp:||Files are read/write||Contents are not retained when application exits|
|file in pkg:||Accesses any files included in app package||Files are read only|
|file on USB device||Accesses files on removable USB media||Files are read only; not all Roku models support USB|
|Registry||Data is read/write; data is retained when |
the application exits and when the system reboots.
|Data size is limited. Each channel has access to only 16kb of registry space.|
Depending on your application's requirements, you can choose one of these options. Interfaces to the registry are documented at roRegistry. Interfaces to files are described below.
A Roku Streaming Player Pathname identifies a file. Pathnames are used in ifFileSystem methods, as well as in other components which use files. A Pathname is a string with the following format:
The device field (sometimes called PHY) identifies the location of the file, and can be one of:
- tmp - temporary file storage device for the application
- pkg - root of the application directory that provides read-only access to files provided in the pkg
Since Firmware version 2.6:
- common – a common read-only filesystem that all plugins have access to. Currently it only contains a CA certificate bundle that contains CA certs trusted by FireFox (common:/certs/ca-bundle.crt). You are encouraged to use this file in your apps, especially if you are aggregating many different feeds. Please see the twitterOAuth sample application for a usage example.
- ext1, ext2, …,ext9 – storage devices recognized on the USB bus. Please see the usbplayer sample application for a usage example.
There is no concept of a current working directory or relative paths. All path names must use the absolute Roku Streaming Player Pathname format above.
The filename components in a pathname may not contain any of these characters:
< > : " / | ? *
nor any whitespace or non-printable character.