org.tranche.util
Class PersistentServerFileUtil

java.lang.Object
  extended by org.tranche.util.PersistentServerFileUtil

public class PersistentServerFileUtil
extends java.lang.Object

Used for persistent files and directories.

Author:
Bryan Smith , James "Augie" Hill - augman85@gmail.com

Method Summary
static java.io.File getPersistentDirectory()
          Get a persistent directory position.
static java.io.File getPersistentDirectory(java.lang.String directoryName)
           
static java.io.File getPersistentFile(java.lang.String fileName)
          Returns a file with the given name in the persistent directory.
static void setPersistentDirectory(java.io.File persistentDirectory)
          Set persistent directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPersistentDirectory

public static java.io.File getPersistentDirectory()

Get a persistent directory position.

Returns:

setPersistentDirectory

public static void setPersistentDirectory(java.io.File persistentDirectory)

Set persistent directory.

Parameters:
persistentDirectory -

getPersistentFile

public static java.io.File getPersistentFile(java.lang.String fileName)
                                      throws java.io.IOException

Returns a file with the given name in the persistent directory. If the file does not exist, it will be created.

Parameters:
fileName - The name of the file.
Returns:
File
Throws:
java.io.IOException

getPersistentDirectory

public static java.io.File getPersistentDirectory(java.lang.String directoryName)
                                           throws java.io.IOException
Parameters:
directoryName -
Returns:
Throws:
java.io.IOException


This code is free for use both commercially and non-commercially as stated in the project's license