lib/Ext/device/filesystem/Sencha.js
function(config) {
                var me = this;
                Ext.device.Communicator.send({
                    command: 'FileSystem#read',
                    path: this.path,
                    fileSystemId: this.fileSystem.id,
                    offset: this.offset,
                    length: config.length,
                    callbacks: {
                        success: function(result) {
                            me.offset = result.offset;

                            if (config.success) {
                                config.success.call(config.scope || this, result.data);
                            }
                        },
                        failure: function(error) {
                            if (config.failure) {
                                config.failure.call(config.scope || this, error);
                            }
                        }
                    },
                    scope: config.scope || this
                });
            }
function(config) {
                var me = this;
                Ext.device.Communicator.send({
                    command: 'FileSystem#read',
                    path: this.path,
                    fileSystemId: this.fileSystem.id,
                    offset: this.offset,
                    length: config.length,
                    callbacks: {
                        success: function(result) {
                            me.offset = result.offset;

                            if (config.success) {
                                config.success.call(config.scope || this, result.data);
                            }
                        },
                        failure: function(error) {
                            if (config.failure) {
                                config.failure.call(config.scope || this, error);
                            }
                        }
                    },
                    scope: config.scope || this
                });
            }
Reads the data from the file starting at the file offset.

@param {Object} config
The object which contains the following config options:

@param {Number} config.length This is optional.
The length of bytes to read from the file. Defaults to the file's current size if unspecified.

@param {Function} config.success This is optional.
The callback to be called when the data has been successfully read.

@param {Object} config.success.data
The read data.

@param {Function} config.failure This is optional.
The callback to be called when an error occurred.

@param {Object} config.failure.error
The occurred error.

@param {Object} config.scope
The scope object