util
Class FileAccess

java.lang.Object
  extended by util.FileAccess
All Implemented Interfaces:
Path

public class FileAccess
extends Object
implements Path

A class providing static methods for accessing files. Intended for easy configuration. Uses the Path interface to define some system properties on first class load. Additionally provides special path-characters to allow user config. Use the unicode private area from E000 to F8FF for shortcuts.


Field Summary
private static String[] SHORTCUT
          An array of path-specification shortcuts.
private static String[] SUBSTITUTE
          The array of key-substitutes for shortcuts.
static String USERCONFIG
          The rest-of-the-world path-shortcut for the user config directory.
 
Fields inherited from interface util.Path
DEFSYSTEM, FILESEP, KEY_SYSTEM, NL, PATHSEP
 
Constructor Summary
FileAccess()
           
 
Method Summary
static File fromName(String path, String name)
          Expands a file name and a path into a file object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHORTCUT

private static final String[] SHORTCUT
An array of path-specification shortcuts.


SUBSTITUTE

private static final String[] SUBSTITUTE
The array of key-substitutes for shortcuts.


USERCONFIG

public static final String USERCONFIG
The rest-of-the-world path-shortcut for the user config directory.

Constructor Detail

FileAccess

public FileAccess()
Method Detail

fromName

public static File fromName(String path,
                            String name)
Expands a file name and a path into a file object. A path name starting with one of the SHORTCUT strings, immediately followed by the file separator char, is substituted with the system-property value of the SUBSTITUTE key.

Parameters:
path - The parent path. Can be null.
name - The file name or a specified path.