de.matthias_burbach.mosaique.core.util
Class FileUtils
java.lang.Object
de.matthias_burbach.mosaique.core.util.FileUtils
- public final class FileUtils
- extends java.lang.Object
- Author:
- Matthias Burbach
Method Summary |
static void |
copy(java.lang.String fromName,
java.lang.String toName)
Performs a file copy.
|
static void |
delete(java.lang.String file)
|
static java.lang.String |
getNameWithoutPath(java.lang.String pathAndName)
|
static java.lang.String |
getPathWithoutName(java.lang.String pathAndName)
|
static boolean |
isValidFile(java.lang.String filePathAndName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getPathWithoutName
public static java.lang.String getPathWithoutName(java.lang.String pathAndName)
- Parameters:
pathAndName
- The path and name of the file to get the path for.
- Returns:
- The path of the file.
getNameWithoutPath
public static java.lang.String getNameWithoutPath(java.lang.String pathAndName)
- Parameters:
pathAndName
- The path and name of the file to get the name for.
- Returns:
- The name of the file.
isValidFile
public static boolean isValidFile(java.lang.String filePathAndName)
- Parameters:
filePathAndName
- The file to check for validity.
- Returns:
true
iff the file exists and is readable
delete
public static void delete(java.lang.String file)
- Parameters:
file
- The file to delete.
copy
public static void copy(java.lang.String fromName,
java.lang.String toName)
throws java.io.IOException
- Performs a file copy.
Before copying the file, however, it performs a lot of tests to make
sure everything is as it should be.
- Parameters:
fromName
- The path and name of the file to copy from.toName
- The path and name of the file to copy to.
- Throws:
java.io.IOException
- if copying fails for any reason
Copyright (c) 1997 by David Flanagan
Copyright © 2005-2006 . All Rights Reserved.