When we started using Phonegap / Cordova, its handling of file transfers was very basic and difficult to use.
We built this script as a helper library, that we could use across different projects, allowing us to easily handle files.
The script was built to provide a standard functionality for uploading and downloading of images, from within a Cordova mobile app, which has to handle the different file system types and streaming methods. It also provides an easy list of functions for common tasks like copying / moving files, creating directories, and checking file existence.
Along with this is default error handling and reporting. It also has in-built mime-type detection and reverse extension type guessing.
One of the handiest features is the ability to recursively create a directory structure, including any missing folders in the path, which can otherwise be tedious and troublesome.