public static function copyFiles($src, $dst, $callback = null, $ignoreList) {
		$src 		= self::normalizePath($src);
		$dst 		= self::normalizePath($dst);
		$dir = \opendir($src);
		@\mkdir($dst, 0777, true);
	    while(false !== ( $file = \readdir($dir)) ) {
			$fullPathSrc 	= self::normalizePath(self::combinePath($src, $file));
			$fullPathDst 	= self::normalizePath(self::combinePath($dst, $file));
			$relativePath 	= self::normalizePath(\str_replace(self::normalizePath(\base_path() . '/') , '', $fullPathSrc));
	        if (( $file != '.' ) && ( $file != '..' ) && !(self::checkPatternMatchFileList($ignoreList, $relativePath))) {
	            if (\is_dir($fullPathSrc)) {
	                self::copyFiles($fullPathSrc, $fullPathDst, $callback, $ignoreList);
	            } else {
					@\copy($fullPathSrc, $fullPathDst);
					if (\is_callable($callback)) {
					    \call_user_func($callback);
					}
	            }
	        }
	    }
	    \closedir($dir);
	}
public static function copyFiles($src, $dst, $callback = null, $ignoreList) {
		$src 		= self::normalizePath($src);
		$dst 		= self::normalizePath($dst);
		$dir = \opendir($src);
		@\mkdir($dst, 0777, true);
	    while(false !== ( $file = \readdir($dir)) ) {
			$fullPathSrc 	= self::normalizePath(self::combinePath($src, $file));
			$fullPathDst 	= self::normalizePath(self::combinePath($dst, $file));
			$relativePath 	= self::normalizePath(\str_replace(self::normalizePath(\base_path() . '/') , '', $fullPathSrc));
	        if (( $file != '.' ) && ( $file != '..' ) && !(self::checkPatternMatchFileList($ignoreList, $relativePath))) {
	            if (\is_dir($fullPathSrc)) {
	                self::copyFiles($fullPathSrc, $fullPathDst, $callback, $ignoreList);
	            } else {
					@\copy($fullPathSrc, $fullPathDst);
					if (\is_callable($callback)) {
					    \call_user_func($callback);
					}
	            }
	        }
	    }
	    \closedir($dir);
	}
public static function copyFiles ( $ src , $ dst , $ callback = null , $ ignoreList ) { $ src = self :: normalizePath ( $ src ) ; $ dst = self :: normalizePath ( $ dst ) ; $ dir = \ opendir ( $ src ) ; @ \ mkdir ( $ dst , 0777 , true ) ; while ( false !== ( $ file = \ readdir ( $ dir ) ) ) { $ fullPathSrc = self :: normalizePath ( self :: combinePath ( $ src , $ file ) ) ; $ fullPathDst = self :: normalizePath ( self :: combinePath ( $ dst , $ file ) ) ; $ relativePath = self :: normalizePath ( \ str_replace ( self :: normalizePath ( \ base_path ( ) . '/' ) , '' , $ fullPathSrc ) ) ; if ( ( $ file != '.' ) && ( $ file != '..' ) && ! ( self :: checkPatternMatchFileList ( $ ignoreList , $ relativePath ) ) ) { if ( \ is_dir ( $ fullPathSrc ) ) { self :: copyFiles ( $ fullPathSrc , $ fullPathDst , $ callback , $ ignoreList ) ; } else { @ \ copy ( $ fullPathSrc , $ fullPathDst ) ; if ( \ is_callable ( $ callback ) ) { \ call_user_func ( $ callback ) ; } } } } \ closedir ( $ dir ) ; }
copy file from source directory to destination directory recursive
@param  string $src         the source directory path
@param  string $dst         the destination directory path
@param  function $callback    a callback function to call on progress update
@return void
copy file from source directory to destination directory recursive