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

Constructor Index

 o PathNameUtilities()

Method Index

 o addSeparator(String)
adds a separator char at the end if there is none and path name is not empty
 o getFileName(String)
returns the last part of the path
 o getParent(String)
returns everything but the last part of the path (no separator at the end)
 o processSpecialDirs(String)
removes .
 o removeSeparator(String)
removes the separator char at the end if there is one and path name wouldn't be empty afterwards
 o split(String)
splits a path name into its parts.

Constructors

 o PathNameUtilities
public PathNameUtilities()

Methods

 o addSeparator
public static String addSeparator(String path)
adds a separator char at the end if there is none and path name is not empty

 o 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

 o processSpecialDirs
public static String processSpecialDirs(String path)
removes . and .. out of a path name

 o getParent
public static String getParent(String path)
returns everything but the last part of the path (no separator at the end)

 o getFileName
public static String getFileName(String path)
returns the last part of the path

 o 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