|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.marringtons.file.Files
Static file helper methods for finding, reading and unlinking files.
| Method Summary | |
static String |
find(String fileName)
Look for an existing file or directory on the data paths and return it's absolute path. |
static File |
findFile(String fileName)
Look for an existing file or directory on the data paths and return it's File Object. |
static String |
getName(File file)
Given a File object return it's absolute path. |
static String |
getType(String name)
Get the file type by file extension. |
static String[] |
readLines(InputStream stream)
Read all the data in a file and return as an array of lines. |
static boolean |
unlink(String name)
Delete a file (can be on the path). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String getType(String name)
name - file name and path to check;
public static String[] readLines(InputStream stream)
throws IOException
stream - to break into lines.
IOExceptionpublic static File findFile(String fileName)
fileName - name of file to find
public static String find(String fileName)
fileName - name of file to find.
public static String getName(File file)
file - File object instance.
public static boolean unlink(String name)
name - of file to delete.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||