function _loadAll(directory, config, entryPoint, processExtension) {
        var result = new $.Deferred();

        FileSystem.getDirectoryForPath(directory).getContents(function (err, contents) {
            if (!err) {
                var i,
                    extensions = [];

                for (i = 0; i < contents.length; i++) {
                    if (contents[i].isDirectory) {
                        // FUTURE (JRB): read package.json instead of just using the entrypoint "main".
                        // Also, load sub-extensions defined in package.json.
                        extensions.push(contents[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 if some extensions had errors
                    result.resolve();
                });
            } else {
                console.error("[Extension] Error -- could not read native directory: " + directory);
                result.reject();
            }
        });

        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 {!{baseUrl: string}} config object with baseUrl property containing absolute path of extension folder
@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.