10. File

The Cordova File API provides an application with the methods it needs to interact with the device’s local directory structure. The API exposes methods an application can use to browse the file system, read, write, copy, move and remove files. An application cannot access just any part of the file system, only the temporary and persistent file storage locations (described later) on a mobile device.

Cordova’s implementation of the File API is based in part on the W3C File API: Directories and System specification (www.w3.org/TR/file-system-api). Not all of the capabilities of the W3C specification have been implemented, but the API provides the essential capabilities most mobile developers will need.

An application would use this API ...

Get Apache Cordova API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.