MCPcopy Create free account
hub / github.com/Neop/mudmap2 / write

Method write

src/main/java/mudmap2/backend/WorldFileList.java:183–196  ·  view source on GitHub ↗

Write history

()

Source from the content-addressed store, hash-verified

181 * Write history
182 */
183 public static void write(){
184 final File historyFile = getHistoryFile();
185
186 // remove nonexistant entries
187 cleanList();
188
189 // write history
190 if(!historyFile.exists() || historyFile.canWrite()){
191 writeListJSON(historyFile);
192 } else {
193 System.err.println("Could not write world history file "
194 + historyFile.getAbsolutePath());
195 }
196 }
197
198 /**
199 * Read JSON-formatted history file

Callers 6

testWriteMethod · 0.95
quitMethod · 0.95
testReadMethod · 0.80
drawMapMethod · 0.80
writeListJSONMethod · 0.80
writeFileMethod · 0.80

Calls 3

getHistoryFileMethod · 0.95
cleanListMethod · 0.95
writeListJSONMethod · 0.95

Tested by 2

testWriteMethod · 0.76
testReadMethod · 0.64