Skip to content

Instantly share code, notes, and snippets.

@Exerosis
Created March 15, 2018 07:08
Show Gist options
  • Select an option

  • Save Exerosis/032117b980bb2efa38b92735e15d92ec to your computer and use it in GitHub Desktop.

Select an option

Save Exerosis/032117b980bb2efa38b92735e15d92ec to your computer and use it in GitHub Desktop.
createDirectories(path.getParent());
if (!exists(path)) {
if (resource != null) {
InputStream stream = getSystemResourceAsStream(this.resource.toString());
if (stream == null)
throw new IllegalStateException("Could not find a resource at: " + resource);
copy(stream, path);
} else
createFile(path);
}
config = loadConfiguration(newBufferedReader(path));
return config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment