lib/Ext/device/filesystem/HTML5.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;
                this.getEntry(
                    {
                        success: function(dirEntry) {
                            var directoryReader = dirEntry.createReader();
                            directoryReader.readEntries(
                                function(entryInfos) {
                                    var entries = [],
                                        i = 0,
                                        len = entryInfos.length;

                                    for (; i < len; i++) {
                                        entryInfo = entryInfos[i];
                                        entries[i] = entryInfo.isDirectory
                                            ? Ext.create('Ext.device.filesystem.DirectoryEntry', entryInfo.fullPath, me.fileSystem)
                                            : Ext.create('Ext.device.filesystem.FileEntry', entryInfo.fullPath, me.fileSystem);
                                    }
                                    config.success.call(config.scope || this, entries);
                                },
                                function(error) {
                                    if (config.failure) {
                                        config.failure.call(config.scope || this, error);
                                    }
                                }
                            );
                        },
                        failure: config.failure
                    }
                );
            }
function(config) {
                if (!config.success) {
                    Ext.Logger.error('Ext.device.filesystem.DirectoryEntry#readEntries: You must specify a `success` callback.');
                    return null;
                }

                var me = this;
                this.getEntry(
                    {
                        success: function(dirEntry) {
                            var directoryReader = dirEntry.createReader();
                            directoryReader.readEntries(
                                function(entryInfos) {
                                    var entries = [],
                                        i = 0,
                                        len = entryInfos.length;

                                    for (; i < len; i++) {
                                        entryInfo = entryInfos[i];
                                        entries[i] = entryInfo.isDirectory
                                            ? Ext.create('Ext.device.filesystem.DirectoryEntry', entryInfo.fullPath, me.fileSystem)
                                            : Ext.create('Ext.device.filesystem.FileEntry', entryInfo.fullPath, me.fileSystem);
                                    }
                                    config.success.call(config.scope || this, entries);
                                },
                                function(error) {
                                    if (config.failure) {
                                        config.failure.call(config.scope || this, error);
                                    }
                                }
                            );
                        },
                        failure: config.failure
                    }
                );
            }
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