Untitled

mail@pastecode.io avatar
unknown
java
5 days ago
354 B
3
Indexable
Never
File file = new File(String.valueOf(main.getDataDirectory()), "config.yml");
if (!file.exists()) {
    try (InputStream in = main.getClass().getClassLoader().getResourceAsStream("config.yml")) {
        Files.copy(in, file.toPath());
    } catch (IOException e) {
        e.printStackTrace();
        //System.out.println(e.getMessage());
    }
}
Leave a Comment