org.apache.maven.wagon
Class PathUtils
java.lang.Object
org.apache.maven.wagon.PathUtils
public class PathUtils
extends java.lang.Object
Various path (URL) manipulation routines
$Id: PathUtils.java 165261 2005-04-29 04:50:40Z brett $static String | basedir(String 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.org this method will return www.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)
|
basedir
public static String basedir(String url)
dirname
public static String dirname(String path)
Returns the directory path portion of a file specification string.
Matches the equally named unix command.
- The directory portion excluding the ending file separator.
dirnames
public static String[] dirnames(String path)
filename
public static String filename(String path)
Returns the filename portion of a file specification string.
- The filename string with extension.
host
public static String host(String url)
Return the host name (Removes protocol and path from the URL) E.g: for input
http://www.codehause.org
this method will return www.apache.org
password
public static String password(String url)
port
public static int port(String url)
protocol
public static String protocol(String url)
/**
Return the protocol name.
E.g: for input
http://www.codehause.org
this method will return http
toRelative
public static String toRelative(File basedir,
String absolutePath)
user
public static String user(String url)