net.sourceforge.jaulp.file.create
Class CreateFileUtils

java.lang.Object
  extended by net.sourceforge.jaulp.file.create.CreateFileUtils

public class CreateFileUtils
extends java.lang.Object

The Class CreateFileUtils helps you to create files or directories.

Version:
1.0
Author:
Asterios Raptis

Constructor Summary
CreateFileUtils()
           
 
Method Summary
static boolean createDirectory(java.io.File dir)
          Creates a new directory.
static boolean createFile(java.io.File file)
          Creates an empty file if the File does not exists otherwise it lets the file as it is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateFileUtils

public CreateFileUtils()
Method Detail

createDirectory

public static boolean createDirectory(java.io.File dir)
                               throws DirectoryAllreadyExistsException
Creates a new directory.

Parameters:
dir - The directory to create.
Returns:
Returns true if the directory was created otherwise false.
Throws:
DirectoryAllreadyExistsException - Thrown if the directory all ready exists.

createFile

public static boolean createFile(java.io.File file)
                          throws java.io.IOException
Creates an empty file if the File does not exists otherwise it lets the file as it is.

Parameters:
file - the file.
Returns:
true, if successful.
Throws:
java.io.IOException - Signals that an I/O exception has occurred.


Copyright © 2010. All Rights Reserved.