function _loadAll(directory, config, entryPoint, processExtension) {
        var result = new $.Deferred();
        
        NativeFileSystem.requestNativeFileSystem(directory,
            function (rootEntry) {
                rootEntry.createReader().readEntries(
                    function (entries) {
                        var i,
                            extensions = [];
                        
                        for (i = 0; i < entries.length; i++) {
                            if (entries[i].isDirectory) {
                                // FUTURE (JRB): read package.json instead of just using the entrypoint "main".
                                // Also, load sub-extensions defined in package.json.
                                extensions.push(entries[i].name);
                            }
                        }

                        if (extensions.length === 0) {
                            result.resolve();
                            return;
                        }
                        
                        Async.doInParallel(extensions, function (item) {
                            var extConfig = {
                                baseUrl: config.baseUrl + "/" + item,
                                paths: config.paths
                            };
                            return processExtension(item, extConfig, entryPoint);
                        }).always(function () {
                            // Always resolve the promise even when the extension entry point is missing
                            result.resolve();
                        });
                    },
                    function (error) {
                        console.log("[Extension] Error -- could not read native directory: " + directory);
                    }
                );
            },
            function (error) {
                console.log("[Extension] Error -- could not open native directory: " + directory);
            });
        
        return result.promise();
    }
@private
Loads a file entryPoint from each extension folder within the baseUrl into its own Require.js context

@param {!string} directory, an absolute native path that contains a directory of extensions.
                 each subdirectory is interpreted as an independent extension
@param {!string} baseUrl, URL path relative to index.html that maps to the same place as directory
@param {!string} entryPoint Module name to load (without .js suffix)
@param {function} processExtension 
@return {!$.Promise} A promise object that is resolved when all extensions complete loading.