|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yajul.io.FileUtil
public class FileUtil
Provides utility methods for dealing with files (java.io.File).
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static int |
recursiveDelete(java.io.File f)
Deletes files or directories recursively, returns the number of files deleted. |
static long |
tail(int numberOfLines,
java.io.File file,
java.io.Writer writer)
Like UN*X tail - writes the last 'n' lines of a file to the writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static int recursiveDelete(java.io.File f) throws java.io.IOException
f
- The file or directory to delete.
java.io.IOException
- if something goes wrong.public static long tail(int numberOfLines, java.io.File file, java.io.Writer writer) throws java.io.IOException
numberOfLines
- the number of tail linesfile
- the file to tailwriter
- where to send the output
java.io.IOException
- if something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |