Package org.apache.maven.wagon
Class PathUtils
java.lang.Object
org.apache.maven.wagon.PathUtils
Various path (URL) manipulation routines
- Author:
- Michal Maczka
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Derive the path portion of the given URL.static String
Returns the directory path portion of a file specification string.static String[]
static String
Returns the filename portion of a file specification string.static String
Return the host name (Removes protocol and path from the URL) E.g: for inputhttp://www.codehause.org
this method will returnwww.apache.org
static String
static int
static String
/** Return the protocol name.static String
toRelative
(File basedir, String absolutePath) static String
-
Method Details
-
dirname
Returns the directory path portion of a file specification string. Matches the equally named unix command.- Returns:
- The directory portion excluding the ending file separator.
-
filename
Returns the filename portion of a file specification string.- Returns:
- The filename string with extension.
-
dirnames
-
host
Return the host name (Removes protocol and path from the URL) E.g: for inputhttp://www.codehause.org
this method will returnwww.apache.org
- Parameters:
url
- the url- Returns:
- the host name
-
protocol
/** Return the protocol name.
E.g: for inputhttp://www.codehause.org
this method will returnhttp
- Parameters:
url
- the url- Returns:
- the host name
-
port
- Parameters:
url
-- Returns:
- the port or
WagonConstants.UNKNOWN_PORT
if not existent
-
basedir
Derive the path portion of the given URL.- Parameters:
url
- the repository URL- Returns:
- the basedir of the repository
-
user
-
password
-
toRelative
-