All Packages Class Hierarchy This Package Previous Next Index
Class org.jos.fs.util.PathNameUtilities
java.lang.Object
|
+----org.jos.fs.util.PathNameUtilities
- public class PathNameUtilities
- extends Object
Static class that contains some methods for manipulating path names
- Version:
- JOS-FileSystem 4 Preview (25-Mar-98)
- Author:
- Stefan Reich
- See Also:
- UnionFileSystem, FSManager
-
PathNameUtilities()
-
-
addSeparator(String)
- adds a separator char at the end if there is none and path name is not empty
-
getFileName(String)
- returns the last part of the path
-
getParent(String)
- returns everything but the last part of the path (no separator at
the end)
-
processSpecialDirs(String)
- removes .
-
removeSeparator(String)
- removes the separator char at the end if there is one and path name
wouldn't be empty afterwards
-
split(String)
- splits a path name into its parts.
PathNameUtilities
public PathNameUtilities()
addSeparator
public static String addSeparator(String path)
- adds a separator char at the end if there is none and path name is not empty
removeSeparator
public static String removeSeparator(String path)
- removes the separator char at the end if there is one and path name
wouldn't be empty afterwards
processSpecialDirs
public static String processSpecialDirs(String path)
- removes . and .. out of a path name
getParent
public static String getParent(String path)
- returns everything but the last part of the path (no separator at
the end)
getFileName
public static String getFileName(String path)
- returns the last part of the path
split
public static Enumeration split(String path)
- splits a path name into its parts. Every part returned doesn't
include a separator (neither at the beginning nor at the end).
- Returns:
- an enumeration of strings
All Packages Class Hierarchy This Package Previous Next Index