function (findPath) {
        // FUTURE OPTIMIZATION:  use a more complicated datastructure for faster lookups
        var found = {}, // length: path
            longest;
        // expands path in case of symlinks
        findPath = libfs.realpathSync(findPath);
        // searchs based on expanded path
        Object.keys(this._bundlePaths).forEach(function (bundlePath) {
            if (0 === findPath.indexOf(bundlePath) &&
                    (findPath.length === bundlePath.length ||
                    libpath.sep === findPath.charAt(bundlePath.length))) {
                found[bundlePath.length] = bundlePath;
            }
        });
        longest = Math.max.apply(Math, Object.keys(found));
        return this._bundlePaths[found[longest]];
    }
function (findPath) {
        
        var found = {}, 
            longest;
        
        findPath = libfs.realpathSync(findPath);
        
        Object.keys(this._bundlePaths).forEach(function (bundlePath) {
            if (0 === findPath.indexOf(bundlePath) &&
                    (findPath.length === bundlePath.length ||
                    libpath.sep === findPath.charAt(bundlePath.length))) {
                found[bundlePath.length] = bundlePath;
            }
        });
        longest = Math.max.apply(Math, Object.keys(found));
        return this._bundlePaths[found[longest]];
    }
function ( findPath ) { // FUTURE OPTIMIZATION:  use a more complicated datastructure for faster lookups var found = { } , // length: path longest ; // expands path in case of symlinks findPath = libfs . realpathSync ( findPath ) ; // searchs based on expanded path Object . keys ( this . _bundlePaths ) . forEach ( function ( bundlePath ) { if ( 0 === findPath . indexOf ( bundlePath ) && ( findPath . length === bundlePath . length || libpath . sep === findPath . charAt ( bundlePath . length ) ) ) { found [ bundlePath . length ] = bundlePath ; } } ) ; longest = Math . max . apply ( Math , Object . keys ( found ) ) ; return this . _bundlePaths [ found [ longest ] ] ; }
Returns the name of the bundle to which the path belongs.
@private
@method _getBundleNameByPath
@param {string} findPath The path to consider.
@return {string} The name the bundle to which the findPath most closely matches.
Returns the name of the bundle to which the path belongs .