org.devaki.nextobjects.util
Class NOFileUtil

java.lang.Object
  extended byorg.devaki.nextobjects.util.NOFileUtil

public final class NOFileUtil
extends java.lang.Object

This class contains general usefull function for handling files

Author:
Emmanuel Florent

Method Summary
static void createDirectory(java.lang.String path)
          Given a path string create all the directories in the path.
static boolean deleteFile(java.io.File file)
          Deletes a file or a directory along with all files and directories it contains.
static void unzip(java.lang.String file, java.lang.String dest, javax.swing.JProgressBar jProgressBar)
          Unzip a fie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

deleteFile

public static boolean deleteFile(java.io.File file)
Deletes a file or a directory along with all files and directories it contains.

Parameters:
file - the file or directory to delete
Returns:
whether delete was successful

createDirectory

public static void createDirectory(java.lang.String path)
Given a path string create all the directories in the path. For example, if the path string is "java/applet", the method will create directory "java" and then "java/applet" if they don't exist. The file separator string "/" is platform dependent system property.

Parameters:
path - Directory path string.

unzip

public static void unzip(java.lang.String file,
                         java.lang.String dest,
                         javax.swing.JProgressBar jProgressBar)
                  throws java.io.IOException
Unzip a fie

Parameters:
file - the file
dest - the destination directory
jProgressBar - the load advance
Throws:
java.io.IOException - an IO exception


Copyright © 2002-2004 devaki.org. All Rights Reserved.