src/Ubiquity/utils/base/UFileSystem.php
public static function cleanPathname($path) {
		if (UString::isNotNull ( $path )) {
			if (\DS === "/")
				$path = \str_replace ( "\\", \DS, $path );
			else
				$path = \str_replace ( "/", \DS, $path );
			$path = \str_replace ( \DS . \DS, \DS, $path );
			if (! UString::endswith ( $path, \DS )) {
				$path = $path . \DS;
			}
		}
		return $path;
	}
public static function cleanPathname($path) {
		if (UString::isNotNull ( $path )) {
			if (\DS === "/")
				$path = \str_replace ( "\\", \DS, $path );
			else
				$path = \str_replace ( "/", \DS, $path );
			$path = \str_replace ( \DS . \DS, \DS, $path );
			if (! UString::endswith ( $path, \DS )) {
				$path = $path . \DS;
			}
		}
		return $path;
	}
public static function cleanPathname ( $ path ) { if ( UString :: isNotNull ( $ path ) ) { if ( \ DS === "/" ) $ path = \ str_replace ( "\\" , \ DS , $ path ) ; else $ path = \ str_replace ( "/" , \ DS , $ path ) ; $ path = \ str_replace ( \ DS . \ DS , \ DS , $ path ) ; if ( ! UString :: endswith ( $ path , \ DS ) ) { $ path = $ path . \ DS ; } } return $ path ; }
Cleans a directory path by removing double backslashes or slashes and using DIRECTORY_SEPARATOR

@param string $path
@return string
Cleans a directory path by removing double backslashes or slashes and using DIRECTORY_SEPARATOR