#989 Create configuration docs page

- Create tool task to generate a doc page with the generated config.yml
- Rename tools.utils.FileUtils to FileIoUtils to avoid naming conflict with fr.xephi.authme.utils.FileUtils
- Make all doc tasks output a success message at the end
- Update all docs pages that have changed
This commit is contained in:
ljacqu
2016-10-23 18:29:00 +02:00
parent 9d21a4cda2
commit b7a7d5b3bd
15 changed files with 577 additions and 56 deletions
@@ -9,11 +9,11 @@ import java.nio.file.StandardOpenOption;
import java.util.List;
/**
* Utility class for reading from and writing to files.
* Utility class for I/O operations on files.
*/
public final class FileUtils {
public final class FileIoUtils {
private FileUtils() {
private FileIoUtils() {
}
public static void generateFileFromTemplate(String templateFile, String destinationFile, TagValueHolder tags) {
@@ -43,8 +43,12 @@ public final class FileUtils {
}
public static String readFromFile(String file) {
return readFromFile(Paths.get(file));
}
public static String readFromFile(Path file) {
try {
return new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8);
return new String(Files.readAllBytes(file), StandardCharsets.UTF_8);
} catch (IOException e) {
throw new UnsupportedOperationException("Could not read from file '" + file + "'", e);
}