|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdochelper.util.FileUtils
public class FileUtils
The class FileUtils
groups file handling utility methods.
The globToRE and listDirectories methods are courtesy of JEdit source code
(MiscUtilities.java) also under the GNU General Public License.
Pertinent notice follows:
Copyright (C) 1999, 2004 Slava Pestov
Portions copyright (C) 2000 Richard S. Hall
Portions copyright (C) 2001 Dirk Moebius
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Constructor Summary | |
---|---|
FileUtils()
Creates a new instance of FileUtils |
Method Summary | |
---|---|
static java.io.File[] |
_listDirectory(java.lang.String path)
List the contents of a directory of fail. |
static java.lang.String |
FileToString(java.io.File file)
Read a file as text and return a String |
static java.lang.String |
globToRE(java.lang.String glob)
Converts a Unix-style glob to a regular expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static java.lang.String globToRE(java.lang.String glob)
? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
glob
- The glob pattern
public static java.io.File[] _listDirectory(java.lang.String path)
path
-
public static java.lang.String FileToString(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
-
java.io.FileNotFoundException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |