| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttcl.lang.FileUtil
public class FileUtil
| Field Summary | |
|---|---|
static int | 
PATH_ABSOLUTE
 | 
static int | 
PATH_RELATIVE
 | 
static int | 
PATH_VOLUME_RELATIVE
 | 
| Constructor Summary | |
|---|---|
FileUtil()
 | 
|
| Method Summary | |
|---|---|
static String | 
doTildeSubst(Interp interp,
             String user)
Given a string following a tilde, this routine returns the corresponding home directory.  | 
static File | 
getLinkTarget(File link)
Get the target file of a link, or null if the specified file is not a link.  | 
static File | 
getNewFileObj(Interp interp,
              String fileName)
 | 
static TclObject | 
getNormalizedPath(Interp interp,
                  TclObject pathObj)
This important function attempts to extract from the given TclObject a unique normalized path representation, whose string value can be used as a unique identifier for the file.  | 
static int | 
getPathType(String path)
 | 
static String | 
getSeparators(String arg)
 | 
static boolean | 
isExecutable(File fileObj)
Tests if the given file is executable by the current user.  | 
static String | 
joinPath(Interp interp,
         TclObject[] argv,
         int startIndex,
         int endIndex)
Combine a list of pathes into one path.  | 
static TclObject | 
splitAndTranslate(Interp interp,
                  String path)
Split the path.  | 
static TclObject | 
splitPath(Interp interp,
          String path)
Turn one path into a list of components.  | 
static String | 
translateFileName(Interp interp,
                  String path)
If the path starts with a tilde, do tilde substitution on the first component and join it with the remainder of the path.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int PATH_RELATIVE
public static final int PATH_VOLUME_RELATIVE
public static final int PATH_ABSOLUTE
| Constructor Detail | 
|---|
public FileUtil()
| Method Detail | 
|---|
public static int getPathType(String path)
path - String path to test
public static File getNewFileObj(Interp interp,
                                 String fileName)
                          throws TclException
interp - current interpreterfileName - filename following Tcl rules
TclException
public static String joinPath(Interp interp,
                              TclObject[] argv,
                              int startIndex,
                              int endIndex)
                       throws TclException
interp - Current interpreterargv - List of pathes to be joined.startIndex - 1st item in argv to join.endIndex - 1st item to ignore.
TclException
public static TclObject splitPath(Interp interp,
                                  String path)
                           throws TclException
interp - current interpreterpath - Path to split
TclException
public static String doTildeSubst(Interp interp,
                                  String user)
                           throws TclException
interp - interpreteruser - username following the tilde
TclException - if env(HOME) is not set or if an unknown user is requested
public static String translateFileName(Interp interp,
                                       String path)
                                throws TclException
interp - current interpreterpath - path to be translationed
TclException
public static TclObject splitAndTranslate(Interp interp,
                                          String path)
                                   throws TclException
interp - current interpreterpath - to be split
TclExceptionpublic static final String getSeparators(String arg)
public static final TclObject getNormalizedPath(Interp interp,
                                                TclObject pathObj)
public static File getLinkTarget(File link)
link - File to test
public static boolean isExecutable(File fileObj)
fileObj - File to test for executability
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||