MCPcopy Create free account
hub / github.com/ZetaMap/MoreCommands / newFile

Method newFile

src/main/java/util/ALog.java:49–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 }
48
49 private static void newFile() {
50 files++;
51 file = Core.files.local(PVars.ALogPath + "ALog-" + files + ".txt");
52
53 if (!file.exists()) {
54 try { file.file().createNewFile(); }
55 catch (java.io.IOException e) { e.printStackTrace(); }
56
57 } else if (file.length() > maxSize) {
58 Log.warn("Admin logs --> file '@ALog-@.txt reached the limit of 1 MB. Find another file ...", PVars.ALogPath, files);
59 newFile();
60 return;
61
62 } else saveSettings();
63 Log.info("Admin logs --> file '@ALog-@.txt' loaded and ready", PVars.ALogPath, files);
64 }
65}

Callers 2

writeMethod · 0.95
initMethod · 0.95

Calls 3

saveSettingsMethod · 0.95
warnMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected