alma::acs::jhelpgen::Util Class Reference
List of all members.
Static Public Member Functions |
| static List< File > | findFiles (List< File > ret, File dir, final String...extensions) |
| static void | writeFile (String contents, File f) |
| static String | readResource (String name) |
Static Package Functions |
| static String | readFile (File f) |
Static Private Attributes |
| static Comparator< File > | alphabeticSort |
Member Function Documentation
| static List<File> alma::acs::jhelpgen::Util::findFiles |
( |
List< File > |
ret, |
|
|
File |
dir, |
|
|
final String... |
extensions | |
|
) |
| | [inline, static] |
Returns all files and directories underneath the specified dir, recursively. Files can be filtered by extensions.
- Parameters:
-
| ret | results will be added to this list |
| dir | the directory to search (recursively) |
| extensions | only include files with these extensions |
- Returns:
References alphabeticSort.
| static String alma::acs::jhelpgen::Util::readFile |
( |
File |
f |
) |
[inline, static, package] |
Reads in the file's contents, skipping all line terminators (newlines or carriage returns).
- Parameters:
-
- Returns:
- the file contents (without line terminators)
- Exceptions:
-
| RuntimeException | if something goes wrong |
| static String alma::acs::jhelpgen::Util::readResource |
( |
String |
name |
) |
[inline, static] |
Reads a resource into a string.
- Parameters:
-
- Returns:
- the resource's content
- Exceptions:
-
| RuntimeException | if something goes wrong |
| static void alma::acs::jhelpgen::Util::writeFile |
( |
String |
contents, |
|
|
File |
f | |
|
) |
| | [inline, static] |
Writes a string to a file.
- Parameters:
-
| contents | the string to write |
| f | the file to write |
- Exceptions:
-
| RuntimeException | if something goes wrong |
Member Data Documentation
Initial value: new Comparator<File>() {
public int compare (File o1, File o2) {
return o1.getName().compareTo(o2.getName());
}
}
Referenced by findFiles().
The documentation for this class was generated from the following file: