railo.commons.io
Class FileUtil

java.lang.Object
  extended by railo.commons.io.FileUtil

public final class FileUtil
extends Object

Helper methods for file objects


Field Summary
static char FILE_ANTI_SEPERATOR
          Field FILE_ANTI_SEPERATOR
static char FILE_SEPERATOR
          Field FILE_SEPERATOR
static short LEVEL_FILE
          Field LEVEL_FILE
static short LEVEL_GRAND_PARENT_FILE
          Field LEVEL_GRAND_PARENT_FILE
static short LEVEL_PARENT_FILE
          Field LEVEL_PARENT_FILE
static short TYPE_DIR
          Field TYPE_DIR
static short TYPE_FILE
          Field TYPE_FILE
 
Constructor Summary
FileUtil()
           
 
Method Summary
static File toFile(File parent, String path)
          create a File from parent file and string
static File toFile(String path)
          create a file from path
static File toFile(String parent, String path)
          create a File from parent file and string
static String URIToFilename(String str)
          Fixes a platform dependent filename to standard URI form.
static File URLToFile(URL url)
          translate a URL to a File Object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_SEPERATOR

public static final char FILE_SEPERATOR
Field FILE_SEPERATOR


FILE_ANTI_SEPERATOR

public static final char FILE_ANTI_SEPERATOR
Field FILE_ANTI_SEPERATOR


TYPE_DIR

public static final short TYPE_DIR
Field TYPE_DIR

See Also:
Constant Field Values

TYPE_FILE

public static final short TYPE_FILE
Field TYPE_FILE

See Also:
Constant Field Values

LEVEL_FILE

public static final short LEVEL_FILE
Field LEVEL_FILE

See Also:
Constant Field Values

LEVEL_PARENT_FILE

public static final short LEVEL_PARENT_FILE
Field LEVEL_PARENT_FILE

See Also:
Constant Field Values

LEVEL_GRAND_PARENT_FILE

public static final short LEVEL_GRAND_PARENT_FILE
Field LEVEL_GRAND_PARENT_FILE

See Also:
Constant Field Values
Constructor Detail

FileUtil

public FileUtil()
Method Detail

toFile

public static File toFile(String path)
create a file from path

Parameters:
path -
Returns:
new File Object

toFile

public static File toFile(File parent,
                          String path)
create a File from parent file and string

Parameters:
parent -
path -
Returns:
new File Object

toFile

public static File toFile(String parent,
                          String path)
create a File from parent file and string

Parameters:
parent -
path -
Returns:
new File Object

URLToFile

public static final File URLToFile(URL url)
                            throws MalformedURLException
translate a URL to a File Object

Parameters:
url -
Returns:
matching file object
Throws:
MalformedURLException

URIToFilename

public static final String URIToFilename(String str)
Fixes a platform dependent filename to standard URI form.

Parameters:
str - The string to fix.
Returns:
Returns the fixed URI string.


Copyright © 2012 Railo