org.crosswire.common.util
Class FileUtil

java.lang.Object
  extended by org.crosswire.common.util.FileUtil

public class FileUtil
extends Object

.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: FileUtil.java,v 1.3 2005/03/20 02:34:52 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
static String EXTENSION_JAVA
          Extension for java files
static String EXTENSION_PROPERTIES
          Extension for properties files
static String EXTENSION_XML
          Extension for XML files
static String EXTENSION_XSLT
          Extension for XSLT files
static String MODE_READ
          Modes for opening random access files
static String MODE_WRITE
          Modes for opening random access files
 
Constructor Summary
private FileUtil()
          Prevent Instansiation
 
Method Summary
static List delete(File file)
          Deletes a file or a directory and all of its contents
private static void deleteContents(File dirPath, List failures)
          Recursive delete files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION_JAVA

public static final String EXTENSION_JAVA
Extension for java files

See Also:
Constant Field Values

EXTENSION_PROPERTIES

public static final String EXTENSION_PROPERTIES
Extension for properties files

See Also:
Constant Field Values

EXTENSION_XSLT

public static final String EXTENSION_XSLT
Extension for XSLT files

See Also:
Constant Field Values

EXTENSION_XML

public static final String EXTENSION_XML
Extension for XML files

See Also:
Constant Field Values

MODE_READ

public static final String MODE_READ
Modes for opening random access files

See Also:
Constant Field Values

MODE_WRITE

public static final String MODE_WRITE
Modes for opening random access files

See Also:
Constant Field Values
Constructor Detail

FileUtil

private FileUtil()
Prevent Instansiation

Method Detail

delete

public static List delete(File file)
Deletes a file or a directory and all of its contents

Parameters:
file - or directory to delete
Returns:
the list of files that could not be deleted

deleteContents

private static void deleteContents(File dirPath,
                                   List failures)
Recursive delete files.

Parameters:
dirPath - directory of files to delete
failures - the list of files that could not be deleted

Copyright ? 2003-2004