public static function getFileCounts($path, $ignoreList){
		$path 		= self::normalizePath($path);
	    $count 		= 0;
		$dir 		= \opendir($path);
	    while(false !== ( $file = \readdir($dir)) ) {
			$fullPath 		= self::normalizePath(self::combinePath($path, $file));
			$relativePath 	= self::normalizePath(\str_replace(self::normalizePath(\base_path() . '/') , '', $fullPath));
	        if (( $file != '.' ) && ( $file != '..' ) && !(self::checkPatternMatchFileList($ignoreList, $relativePath))) {
	            if ( \is_dir($fullPath) ) {
	                $count += self::getFileCounts($fullPath, $ignoreList);
	            }
	            else {
					$count++;
	            }
	        }
	    }
	    \closedir($dir);
	    return $count;
	}
public static function getFileCounts($path, $ignoreList){
		$path 		= self::normalizePath($path);
	    $count 		= 0;
		$dir 		= \opendir($path);
	    while(false !== ( $file = \readdir($dir)) ) {
			$fullPath 		= self::normalizePath(self::combinePath($path, $file));
			$relativePath 	= self::normalizePath(\str_replace(self::normalizePath(\base_path() . '/') , '', $fullPath));
	        if (( $file != '.' ) && ( $file != '..' ) && !(self::checkPatternMatchFileList($ignoreList, $relativePath))) {
	            if ( \is_dir($fullPath) ) {
	                $count += self::getFileCounts($fullPath, $ignoreList);
	            }
	            else {
					$count++;
	            }
	        }
	    }
	    \closedir($dir);
	    return $count;
	}
public static function getFileCounts ( $ path , $ ignoreList ) { $ path = self :: normalizePath ( $ path ) ; $ count = 0 ; $ dir = \ opendir ( $ path ) ; while ( false !== ( $ file = \ readdir ( $ dir ) ) ) { $ fullPath = self :: normalizePath ( self :: combinePath ( $ path , $ file ) ) ; $ relativePath = self :: normalizePath ( \ str_replace ( self :: normalizePath ( \ base_path ( ) . '/' ) , '' , $ fullPath ) ) ; if ( ( $ file != '.' ) && ( $ file != '..' ) && ! ( self :: checkPatternMatchFileList ( $ ignoreList , $ relativePath ) ) ) { if ( \ is_dir ( $ fullPath ) ) { $ count += self :: getFileCounts ( $ fullPath , $ ignoreList ) ; } else { $ count ++ ; } } } \ closedir ( $ dir ) ; return $ count ; }
get file count in directory
@param  string $path       directory path
@param  array $ignoreList files to ignored in counting
@return int             count of file
get file count in directory