lib/Ext/device/filesystem/Sencha.js
function(config) {
                if (!config.success) {
                    Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#readEntries: You must specify a `success` callback.');
                    return null;
                }

                var me = this;
                Ext.device.Communicator.send({
                    command: 'FileSystem#readEntries',
                    path: this.path,
                    fileSystemId: this.fileSystem.id,
                    callbacks: {
                        success: function(entryInfos) {
                            var entries = entryInfos.map(function(entryInfo) {
                                return entryInfo.directory
                                    ? Ext.create('Ext.device.filesystem.DirectoryEntry', entryInfo.path, me.fileSystem)
                                    : Ext.create('Ext.device.filesystem.FileEntry', entryInfo.path, me.fileSystem);
                            });

                            config.success.call(config.scope || this, entries);
                        },
                        failure: function(error) {
                            if (config.failure) {
                                config.failure.call(config.scope || this, error);
                            }
                        }
                    },
                    scope: config.scope || this
                });
            }
function(config) {
                if (!config.success) {
                    Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#readEntries: You must specify a `success` callback.');
                    return null;
                }

                var me = this;
                Ext.device.Communicator.send({
                    command: 'FileSystem#readEntries',
                    path: this.path,
                    fileSystemId: this.fileSystem.id,
                    callbacks: {
                        success: function(entryInfos) {
                            var entries = entryInfos.map(function(entryInfo) {
                                return entryInfo.directory
                                    ? Ext.create('Ext.device.filesystem.DirectoryEntry', entryInfo.path, me.fileSystem)
                                    : Ext.create('Ext.device.filesystem.FileEntry', entryInfo.path, me.fileSystem);
                            });

                            config.success.call(config.scope || this, entries);
                        },
                        failure: function(error) {
                            if (config.failure) {
                                config.failure.call(config.scope || this, error);
                            }
                        }
                    },
                    scope: config.scope || this
                });
            }
Lists all the entries in the directory.

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

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

@param {Ext.device.filesystem.Entry[]} config.success.entries
The array of entries of the directory.

@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