com.lq.cli.comment.FileUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springboot-dagger Show documentation
Show all versions of springboot-dagger Show documentation
Fast construction of springboot microservices
package com.lq.cli.comment;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
public class FileUtil {
public static void createWriteFile(File file,String content) throws IOException {
if (!file.exists()){
file.createNewFile();
}
FileOutputStream fos = new FileOutputStream(file);
fos.write(content.getBytes(StandardCharsets.UTF_8));
fos.close();
}
}