|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectUtil.PathTools
public class PathTools
Collection of file path related stuff
| Method Summary | |
|---|---|
static java.lang.String[] |
fileList(java.lang.String pathList)
Build a file list of all the files in the specified directories matching the specified wildcard. pathList can contain several paths separated by a semi-colon (;) e.g. |
static java.lang.String |
getAbsolutePath(java.lang.String relativePath)
Turn a relative path or filename into an absolute one |
static java.lang.String |
getAbsolutePath(java.lang.String relativePath,
boolean addSlash)
Turn a relative path or filename into an absolute one |
static java.lang.String |
getAbsolutePath(java.lang.String relativePath,
java.lang.String workingPath)
Turn a relative path or filename into an absolute one, relative to a directory other than the current directory |
static java.lang.String |
getAbsolutePath(java.lang.String relativePath,
java.lang.String workingPath,
boolean addSlash)
Turn a relative path or filename into an absolute one, relative to a directory other than the current directory |
static java.lang.String |
getRelativePath(java.lang.String absolutePath)
Get relative path of absolutePath from the current directory. |
static java.lang.String |
getRelativePath(java.lang.String absolutePath,
boolean addSlash)
Get relative path of absolutePath from the current directory, optionally appending the result with a path separator |
static java.lang.String |
getRelativePath(java.lang.String absolutePath,
java.lang.String workingPath)
Get relative path of absolutePath from the current directory. |
static java.lang.String |
getRelativePath(java.lang.String absolutePath,
java.lang.String workingPath,
boolean addSlash)
Get relative path of absolutePath from workingPath, optionally appending the result with a path separator |
static java.lang.String |
getSafePath(java.lang.String path)
Ensure a path ends with a '/' |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getAbsolutePath(java.lang.String relativePath)
relativePath - The relative path to convert to an absolute one
public static java.lang.String getAbsolutePath(java.lang.String relativePath,
java.lang.String workingPath)
relativePath - The relative path to convert to an absolute oneworkingPath - The home path from which the relative path is from. If
this is null, the current working path is used
public static java.lang.String getAbsolutePath(java.lang.String relativePath,
boolean addSlash)
relativePath - The relative path to convert to an absolute oneaddSlash - Specify true if returned path must end with a '/', false
if it's not important
public static java.lang.String getAbsolutePath(java.lang.String relativePath,
java.lang.String workingPath,
boolean addSlash)
relativePath - The relative path to convert to an absolute oneaddSlash - Specify true if returned path must end with a '/', false
if it's not important
public static java.lang.String getRelativePath(java.lang.String absolutePath)
absolutePath - file to generate path for
public static java.lang.String getRelativePath(java.lang.String absolutePath,
boolean addSlash)
absolutePath - file to generate path foraddSlash - true to terminate the result with a path separator
public static java.lang.String getRelativePath(java.lang.String absolutePath,
java.lang.String workingPath)
absolutePath - file to generate path forworkingPath - base path, should be a directory, not a file, or it
doesn't make sense
public static java.lang.String getRelativePath(java.lang.String absolutePath,
java.lang.String workingPath,
boolean addSlash)
absolutePath - file to generate path forworkingPath - base path, should be a directory, not a file, or it
doesn't make senseaddSlash - true to terminate the result with a path separator
public static java.lang.String getSafePath(java.lang.String path)
path - The path to fix
public static java.lang.String[] fileList(java.lang.String pathList)
pathList - The list of semi-colon (;) separated paths to search
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||