net.sourceforge.pmd.doc.internal.DefaultFileWriter Maven / Gradle / Ivy
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.doc.internal;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
public class DefaultFileWriter implements FileWriter {
@Override
public void write(Path path, List lines) throws IOException {
Files.createDirectories(path.getParent());
Files.write(path, lines, StandardCharsets.UTF_8);
}
}