public function getFiles($dir){
		$dir = self::normalizePath($dir);
	    $files = scandir($dir);
		$results = [];
	    foreach($files as $key => $value){
		    $path = self::normalizePath(self::combinePath($dir, $value));
	        if(!is_dir($path)) {
	        	$results[] = $path;
	        } else if($value != "." && $value != "..") {
	            $results = array_merge($results, getDirContents($path));
	        }
	    }
	    return $results;
	}
public function getFiles($dir){
		$dir = self::normalizePath($dir);
	    $files = scandir($dir);
		$results = [];
	    foreach($files as $key => $value){
		    $path = self::normalizePath(self::combinePath($dir, $value));
	        if(!is_dir($path)) {
	        	$results[] = $path;
	        } else if($value != "." && $value != "..") {
	            $results = array_merge($results, getDirContents($path));
	        }
	    }
	    return $results;
	}
public function getFiles ( $ dir ) { $ dir = self :: normalizePath ( $ dir ) ; $ files = scandir ( $ dir ) ; $ results = [ ] ; foreach ( $ files as $ key => $ value ) { $ path = self :: normalizePath ( self :: combinePath ( $ dir , $ value ) ) ; if ( ! is_dir ( $ path ) ) { $ results [ ] = $ path ; } else if ( $ value != "." && $ value != ".." ) { $ results = array_merge ( $ results , getDirContents ( $ path ) ) ; } } return $ results ; }
get all files in directory recursive
@param  string $dir directory path
@return array      list of files in directory
get all files in directory recursive