org.apache.archiva.common.utils
Class PathUtil
java.lang.Object
org.apache.archiva.common.utils.PathUtil
public class PathUtil
- extends Object
PathUtil - simple utility methods for path manipulation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PathUtil
public PathUtil()
toUrl
public static String toUrl(String path)
toUrl
public static String toUrl(File file)
getRelative
public static String getRelative(String basedir,
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 String getRelative(String basedir,
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)
Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.