function all( paths, dir, done ) {
	var count;
	var child;
	var spath;
	var FLG;
	var out;

	count = 0; // initialize counter to track if we are done resolving all paths
	FLG = 0; // initialize flag to track if we are done traversing a directory level
	out = nulls( paths.length );

	// Start at a base directory and continue moving up through each parent directory...
	return next( dir );

	/**
	* Resolves paths within a directory.
	*
	* @private
	* @param {string} dir - directory to search
	*/
	function next( dir ) {
		var i;
		for ( i = 0; i < paths.length; i++ ) {
			spath = resolve( dir, paths[ i ] );
			exists( spath, getCallback( i, spath ) );
		}
	}

	/**
	* Returns a callback to be invoked upon checking for path existence.
	*
	* @private
	* @param {NonNegativeInteger} idx - index
	* @param {string} spath - resolved path
	* @returns {Callback} callback
	*/
	function getCallback( idx, spath ) {
		return onExists;

		/**
		* Callback invoked after checking for path existence.
		*
		* @private
		* @param {(Error|null)} error - error object
		* @param {boolean} bool - boolean indicating if a path exists
		* @returns {void}
		*/
		function onExists( error, bool ) { // eslint-disable-line node/handle-callback-err
			if ( bool ) {
				out[ idx ] = spath;
				count += 1;
			}
			FLG += 1;
			if ( FLG === paths.length ) {
				// Check if we have resolved any path...
				if ( count === paths.length ) {
					return done( null, out );
				}
				// Resolve a parent directory:
				child = dir;
				dir = resolve( dir, '..' );

				// Reset flag and buffers:
				FLG = 0;
				out = [];
				count = 0;

				// If we have already reached root, we cannot resolve any higher directories...
				if ( child === dir ) {
					return done( null, out );
				}
				// Resolve paths at next directory level:
				return next( dir );
			}
		}
	}
}
Asynchronously resolves all paths from a set of paths at a directory level by walking parent directories.

@private
@param {Array<string>} paths - paths to resolve
@param {string} dir - base directory
@param {Callback} done - callback to invoke after resolving paths
@returns {void}