net.ultrametrics.io
Class FileHelper
java.lang.Object
|
+--net.ultrametrics.io.FileHelper
- public class FileHelper
- extends java.lang.Object
Utility methods to parse paths and verify files.
Method Summary |
static java.lang.String |
getNewCanonicalPath(java.lang.String abs,
java.lang.String rel)
Convert an absolute plus relative path into a canonical path. |
static java.lang.String |
getNewPath(java.lang.String abs,
java.lang.String rel)
Convert an absolute plus relative path into a path. |
static java.util.SortedSet |
getVerifiedNodes(java.lang.String[] strings,
boolean verbose)
Convert an array of strings representing file paths into files. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FileHelper
public FileHelper()
getVerifiedNodes
public static java.util.SortedSet getVerifiedNodes(java.lang.String[] strings,
boolean verbose)
- Convert an array of strings representing file paths into files.
Returns a sorted set containing only the files which
are valid directories.
- Parameters:
strings
- an array of directory names.verbose
- indicates whether warnings should be dumped to stderr- Returns:
- a sorted set of files.
getNewPath
public static java.lang.String getNewPath(java.lang.String abs,
java.lang.String rel)
- Convert an absolute plus relative path into a path.
- Parameters:
abs
- an absolute path.rel
- a path relative to the absolute path specified.- Returns:
- an absolute path formed from the provided paths.
getNewCanonicalPath
public static java.lang.String getNewCanonicalPath(java.lang.String abs,
java.lang.String rel)
throws java.io.IOException
- Convert an absolute plus relative path into a canonical path.
- Parameters:
abs
- an absolute path.rel
- a path relative to the absolute path specified.- Returns:
- a canonical path formed from the provided paths.