com.ebmwebsourcing.petalsbpm.utils.server
Class FileHelper

java.lang.Object
  extended by com.ebmwebsourcing.petalsbpm.utils.server.FileHelper

public class FileHelper
extends java.lang.Object


Constructor Summary
FileHelper()
           
 
Method Summary
static void cleanDirectory(java.io.File dir)
          Recursively deletes all the children of the directory
static void copyFile(java.io.File file, java.io.File outputDirectory)
          Copies the given file into the given output directory
static java.lang.String getUsablePath(java.io.File dir)
           
static java.lang.String getUsablePath(java.lang.String path)
           
static void recursiveDelete(java.io.File f)
          Recursively deletes the file and its children
static void writeFile(java.lang.String absoluteFilePath, java.lang.String content)
          Writes the given content in a the file denoted by the given path (creating it if necessary)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHelper

public FileHelper()
Method Detail

writeFile

public static void writeFile(java.lang.String absoluteFilePath,
                             java.lang.String content)
                      throws java.io.IOException
Writes the given content in a the file denoted by the given path (creating it if necessary)

Parameters:
absolutePath -
content -
Throws:
java.io.IOException

copyFile

public static void copyFile(java.io.File file,
                            java.io.File outputDirectory)
                     throws java.io.IOException
Copies the given file into the given output directory

Parameters:
file -
outputDirectory -
Throws:
java.io.IOException

cleanDirectory

public static void cleanDirectory(java.io.File dir)
Recursively deletes all the children of the directory

Parameters:
dir -

recursiveDelete

public static void recursiveDelete(java.io.File f)
Recursively deletes the file and its children

Parameters:
f -

getUsablePath

public static java.lang.String getUsablePath(java.io.File dir)

getUsablePath

public static java.lang.String getUsablePath(java.lang.String path)


Copyright © 2010-2011 eBM WebSourcing. All Rights Reserved.