examples/phonegap1/plugins/cordova-plugin-file/www/FileWriter.js
function(file) {
    this.fileName = "";
    this.length = 0;
    if (file) {
        this.localURL = file.localURL || file;
        this.length = file.size || 0;
    }
    // default is to write at the beginning of the file
    this.position = 0;

    this.readyState = 0; // EMPTY

    this.result = null;

    // Error
    this.error = null;

    // Event handlers
    this.onwritestart = null;   // When writing starts
    this.onprogress = null;     // While writing the file, and reporting partial file data
    this.onwrite = null;        // When the write has successfully completed.
    this.onwriteend = null;     // When the request has completed (either in success or failure).
    this.onabort = null;        // When the write has been aborted. For instance, by invoking the abort() method.
    this.onerror = null;        // When the write has failed (see errors).
}
function(file) {
    this.fileName = "";
    this.length = 0;
    if (file) {
        this.localURL = file.localURL || file;
        this.length = file.size || 0;
    }
    // default is to write at the beginning of the file
    this.position = 0;

    this.readyState = 0; // EMPTY

    this.result = null;

    // Error
    this.error = null;

    // Event handlers
    this.onwritestart = null;   // When writing starts
    this.onprogress = null;     // While writing the file, and reporting partial file data
    this.onwrite = null;        // When the write has successfully completed.
    this.onwriteend = null;     // When the request has completed (either in success or failure).
    this.onabort = null;        // When the write has been aborted. For instance, by invoking the abort() method.
    this.onerror = null;        // When the write has failed (see errors).
}
function ( file ) { this . fileName = "" ; this . length = 0 ; if ( file ) { this . localURL = file . localURL || file ; this . length = file . size || 0 ; } // default is to write at the beginning of the file this . position = 0 ; this . readyState = 0 ; // EMPTY this . result = null ; // Error this . error = null ; // Event handlers this . onwritestart = null ; // When writing starts this . onprogress = null ; // While writing the file, and reporting partial file data this . onwrite = null ; // When the write has successfully completed. this . onwriteend = null ; // When the request has completed (either in success or failure). this . onabort = null ; // When the write has been aborted. For instance, by invoking the abort() method. this . onerror = null ; // When the write has failed (see errors). }
This class writes to the mobile device file system.

For Android:
The root directory is the root of the file system.
To write to the SD card, the file name is "sdcard/my_file.txt"

@constructor
@param file {File} File object containing file properties
@param append if true write to the end of the file, otherwise overwrite the file
This class writes to the mobile device file system .