phelps.io
public class Files extends Object
Version: $Revision: 1.2 $ $Date: 2003/08/07 03:25:57 $
Field Summary | |
---|---|
static int | BUFSIZ Size a common current disk block size. |
Method Summary | |
---|---|
static void | copy(File filein, File fileout)
Copies filein to fileout, creating parent directories as needed. |
static File | getCanonicalFile(String path) Like java.io.File#getCanonicalFile(String) but also expands ~ to users home directory (as given by the user.home property). |
static File | getFile(String path) Like java.io.File#File(String) but also expands ~ to users home directory (as given by the user.home property). |
static File | getFuzzyFile(File base, String path)
Returns existing file (not directory), looking around a little if necessary:
|
static boolean | isBackup(String filename) Returns true if filename is a backup file (e.g., end with ".bkup", with possible additional compression suffix). |
static boolean | isCompressed(String filename)
Returns true if filename has a compression suffix for a type we can handle,
which are .gz .Z .z .bzip2 .bz2. |
static String | relative(File base, File file) Computes paths of file relative to base and relative to HOME directory, and returns the shorter. |
static boolean | secureDelete(File file)
Securely deletes a file by first overwriting it with random data several times. |
static byte[] | toByteArray(File file) |
~
to users home directory (as given by the user.home
property).~
to users home directory (as given by the user.home
property).Returns: true
iff successful