test/java/fr/jayasoft/ivy/repository/vfs/VfsURI.java
/**
	 * Convert a resource path to the format required for a VFS resource identifier
	 * 
	 * @param path <code>String</code> path to the resource
	 * @return <code>String</code> representing a normalized resource path
	 */
Convert a resource path to the format required for a VFS resource identifier

@param path String path to the resource
@return String representing a normalized resource path
Convert a resource path to the format required for a VFS resource identifier @param path String path to the resource @return String representing a normalized resource path
private String normalizePath(String path) {
		String normalizedPath = path.replaceAll("\\\\", "/");
		normalizedPath = normalizedPath.replaceAll("//+", "/");
		if(! normalizedPath.startsWith("/")) {
			normalizedPath = "/" + normalizedPath;
		}
		return normalizedPath.trim();
	}
private String normalizePath ( String path ) { String normalizedPath = path . replaceAll ( "\\\\" , "/" ) ; normalizedPath = normalizedPath . replaceAll ( "//+" , "/" ) ; if ( ! normalizedPath . startsWith ( "/" ) ) { normalizedPath = "/" + normalizedPath ; } return normalizedPath . trim ( ) ; }
Convert a resource path to the format required for a VFS resource identifier
Convert a resource path to the format required for a VFS resource identifier
// all backslashes replaced with forward slashes // collapse multiple instance of forward slashes to single slashes  // ensure that our path starts with a forward slash