public final class PathUtils extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static String | basedir(String url)Derive the path portion of the given URL. | 
| static String | dirname(String path)Returns the directory path portion of a file specification string. | 
| static String[] | dirnames(String path) | 
| static String | filename(String path)Returns the filename portion of a file specification string. | 
| static String | host(String url)Return the host name (Removes protocol and path from the URL) E.g: for input
  http://www.codehause.orgthis method will returnwww.apache.org | 
| static String | password(String url) | 
| static int | port(String url) | 
| static String | protocol(String url)/**
 Return the protocol name. | 
| static String | toRelative(File basedir,
                    String absolutePath) | 
| static String | user(String url) | 
public static String dirname(String path)
public static String filename(String path)
public static String host(String url)
http://www.codehause.org this method will return www.apache.orgurl - the urlpublic static String protocol(String url)
http://www.codehause.org this method will return httpurl - the urlpublic static int port(String url)
url - WagonConstants.UNKNOWN_PORT if not existentpublic static String basedir(String url)
url - the repository URLpublic static String toRelative(File basedir, String absolutePath)
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.