com.taleo.integration.client.customstep.util
Class IOUtils

java.lang.Object
  extended by com.taleo.integration.client.customstep.util.IOUtils

public final class IOUtils
extends Object

Utility class that wraps some file I/O functions.

Author:
Romain Guay, Taleo Corporation

Constructor Summary
IOUtils()
           
 
Method Summary
static File createTempFile(String folder)
          Create a temporary file using the specified folder path.
static void sortFilesByNameAscending(File[] files, boolean asc)
          Sort an array of files by their name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtils

public IOUtils()
Method Detail

createTempFile

public static File createTempFile(String folder)
                           throws IOException
Create a temporary file using the specified folder path. If the folder specified is null or empty, the file is created in the default system temporary file folder. If the specified folder does not exists the folder will be created.

Parameters:
folder - The folder in which to create the file
Returns:
The newly created temporary file
Throws:
IOException

sortFilesByNameAscending

public static void sortFilesByNameAscending(File[] files,
                                            boolean asc)
Sort an array of files by their name.

Parameters:
files - The array of files.
asc - Sort ascending.