MCPcopy Create free account
hub / github.com/Garten/sourcecraft / write

Method write

src/periphery/ConfigIO.java:16–22  ·  view source on GitHub ↗
(Config config, Path target)

Source from the content-addressed store, hash-verified

14public class ConfigIO {
15
16 public static void write(Config config, Path target) throws IOException {
17 Gson gson = new GsonBuilder().setPrettyPrinting()
18 .create();
19 String toSafe = gson.toJson(config);
20
21 Files.write(target, toSafe.getBytes());
22 }
23
24 public static Config obtain(Config config, Path path) {
25 try {

Callers 1

writeConfigMethod · 0.95

Calls 2

writeMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected