|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.io.FileSystemReference
Services for working with references to files and directories in a file system.
The underlying Java base class library file system
support does not support objects which distinguish between
file and directory elements. Consequently, prototocol for
both types of elements are muddled together in the File
,
class which makes it somewhat confusing and hard to work with.
Be aware that a File
instance holds a
file system path reference which need not reference an existing
element. There is no distinction between a path reference
and the referenced element, which again can make the base system
classes somewhat hard to work with.
At some point this class will likely become instantiatable and
provide name parsing and resolution services along the lines of the
Visual Smalltalk FileSystemPath class.
[Deb 23-Jan-2002]
Method Summary | |
static java.lang.String |
computeRelativePath(java.io.File fsElement,
java.io.File referenceDirectory)
Answer the relative path name of the specified file system element relative to a reference directory in the file system hierarchy. |
static java.lang.String |
getFileBaseName(java.io.File aFile)
Answer the base file name (without extension) of the given file. |
static java.lang.String |
getFileBaseName(java.lang.String aFileName)
Answer the base file name (without extension) of the given file name. |
static java.lang.String |
getFileExtension(java.io.File aFile)
Answer the file extension of the given file. |
static java.lang.String |
getFileExtension(java.lang.String aFileName)
Answer the file extension of the given file name. |
static boolean |
hasFileExtension(java.io.File aFile,
java.lang.String extension)
Answer whether the given file has the specified extensions. |
static java.lang.String |
mapPathSeparator(java.lang.String aPathName,
char separator)
Map the path component separator in a local file system path name to use the specified separator. |
static java.io.File |
resolveRelativePath(java.io.File referenceDirectory,
java.lang.String relativePathName)
Resolve a relative file system path name. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String computeRelativePath(java.io.File fsElement, java.io.File referenceDirectory)
public static java.lang.String getFileBaseName(java.io.File aFile)
public static java.lang.String getFileBaseName(java.lang.String aFileName)
public static java.lang.String getFileExtension(java.io.File aFile)
public static java.lang.String getFileExtension(java.lang.String aFileName)
public static boolean hasFileExtension(java.io.File aFile, java.lang.String extension)
public static java.lang.String mapPathSeparator(java.lang.String aPathName, char separator)
public static java.io.File resolveRelativePath(java.io.File referenceDirectory, java.lang.String relativePathName)
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |