Examples of WritableFile


Examples of net.sf.laja.example.file.behaviour.WritableFile

        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();

        System.out.println("Created file '" + tempFilename + "' in directory '" + tempDirPath + "'.");

        return closedFile;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.