phelps.io
public class Files extends Object
Version: $Revision: 1.3 $ $Date: 2003/10/13 06:18:37 $
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 , . |
static String | relative(File base, File file) Returns path of file relative to base. |
static boolean | secureDelete(File file)
Securely deletes a file by first overwriting it with random data several times. |
static String | shortpath(File base, File file) Returns the shortest path: absolute, relative to base, or relative to user home directory. |
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)..gz
, .Z
, .bzip2
/.bz2
.Returns: true
iff successful