|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.io.Files
public class Files
Utility class with static methods for file handling, e.g. copying files
| Method Summary | |
|---|---|
static void |
copyFile(File src,
File dst)
Copy the given src file to dst |
static void |
deleteRecursive(File dir)
Deletes the contents of the given directory recursively, but not the directory itself |
static String |
getFileNameStamped()
Returns a file name created from a time stamp, including date and time up tp milliseconds: yyyy-MM-dd_hh-mm-ss-SSS |
static File |
getTempDir()
Returns the system temp directory, see SystemProperties.JAVA_IO_TMPDIR |
static File |
getTempFile(String fileName)
Returns the specified file with system temp directory as parent. |
static File |
getTempFileStamped()
Returns a stamped file with system temp
directory as parent. |
static File |
getUserHome()
Returns the current user's home directory, see SystemProperties.USER_HOME |
static File |
getUserWorkingDir()
Returns the user's current working directory directory, see SystemProperties.USER_DIR |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void copyFile(File src,
File dst)
throws IOException
IOException
public static void deleteRecursive(File dir)
throws IOException
IOException - if a file could not be deleted
SecurityException - if a security manager exists and its
SecurityManager.checkDelete(java.lang.String) method
denies delete access to the filepublic static File getTempDir()
SystemProperties.JAVA_IO_TMPDIR
public static File getTempFile(String fileName)
getTempDir() and SystemProperties.JAVA_IO_TMPDIR
public static File getTempFileStamped()
stamped file with system temp
directory as parent.
See also getTempDir() and SystemProperties.JAVA_IO_TMPDIR
public static String getFileNameStamped()
yyyy-MM-dd_hh-mm-ss-SSS
public static File getUserHome()
SystemProperties.USER_HOME
public static File getUserWorkingDir()
SystemProperties.USER_DIR
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||