System.out.println("\n==== Write to file ====\n");
final String tempDirPath = "./target";
final String tempFilename = "temp.txt";
Directory.createDirectoryIfNotExists(tempDirPath);
Directory tempDirectory = Directory.directoryPath(tempDirPath).asDirectory();
WritableFile writableFile = FileFactory.filename(tempFilename).asWritableFile(tempDirectory, true);
writableFile.writeln("Test writing to file");
writableFile.writeln("row 2");
ClosedFile closedFile = writableFile.close();