|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjgnash.util.FileUtils
public final class FileUtils
File utilities
| Field Summary | |
|---|---|
private static java.lang.String |
FILEEXTREGEX
Regular expression for returning the file extension |
| Constructor Summary | |
|---|---|
private |
FileUtils()
|
| Method Summary | |
|---|---|
static void |
compressFile(java.io.File source,
java.io.File destination)
|
static boolean |
copyFile(java.io.File src,
java.io.File dst)
Make a copy of a file given a source and destination. |
static boolean |
fileHasExtension(java.lang.String fileName)
Determine if the supplied file name has an extension |
static java.util.List<java.io.File> |
getDirectoryListing(java.io.File directory,
java.lang.String pattern)
Returns a sorted list of files in a specified directory that match a DOS style wildcard search pattern. |
static java.lang.String |
getFileExtension(java.lang.String fileName)
|
static boolean |
isFileLocked(java.lang.String fileName)
Determines if a file has been locked for use. |
static java.lang.String |
stripFileExtension(java.lang.String fileName)
Strips the extension off of the supplied filename. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String FILEEXTREGEX
| Constructor Detail |
|---|
private FileUtils()
| Method Detail |
|---|
public static boolean isFileLocked(java.lang.String fileName)
throws java.io.FileNotFoundException
fileName - file name to check for locked state
java.io.FileNotFoundException - thrown if file does not existpublic static java.lang.String stripFileExtension(java.lang.String fileName)
fileName - filename to strip the extension off
public static boolean fileHasExtension(java.lang.String fileName)
fileName - filename to check
public static java.lang.String getFileExtension(java.lang.String fileName)
public static boolean copyFile(java.io.File src,
java.io.File dst)
throws java.io.FileNotFoundException
src - Source filedst - Destination file
java.io.FileNotFoundException - thrown if the src file is not found or if the dst file is not a valid filename
public static void compressFile(java.io.File source,
java.io.File destination)
public static java.util.List<java.io.File> getDirectoryListing(java.io.File directory,
java.lang.String pattern)
directory - base directory for the searchpattern - DOS search pattern
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||