This project has retired. For details please refer to its Attic page.
PathUtil

org.apache.maven.archiva.common.utils
Class PathUtil

Package class diagram package PathUtil
java.lang.Object
  extended by org.apache.maven.archiva.common.utils.PathUtil

public class PathUtil
extends java.lang.Object

PathUtil - simple utility methods for path manipulation.


Constructor Summary
PathUtil()
           
 
Method Summary
static java.lang.String getRelative(java.lang.String basedir, java.io.File file)
          Given a basedir and a child file, return the relative path to the child.
static java.lang.String getRelative(java.lang.String basedir, java.lang.String child)
          Given a basedir and a child file, return the relative path to the child.
static java.lang.String toUrl(java.io.File file)
           
static java.lang.String toUrl(java.lang.String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathUtil

public PathUtil()
Method Detail

toUrl

public static java.lang.String toUrl(java.lang.String path)

toUrl

public static java.lang.String toUrl(java.io.File file)

getRelative

public static java.lang.String getRelative(java.lang.String basedir,
                                           java.io.File file)
Given a basedir and a child file, return the relative path to the child.

Parameters:
basedir - the basedir.
file - the file to get the relative path for.
Returns:
the relative path to the child. (NOTE: this path will NOT start with a File.separator character)

getRelative

public static java.lang.String getRelative(java.lang.String basedir,
                                           java.lang.String child)
Given a basedir and a child file, return the relative path to the child.

Parameters:
basedir - the basedir.
child - the child path (can be a full path)
Returns:
the relative path to the child. (NOTE: this path will NOT start with a File.separator character)