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

Method cleanList

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

Removes entries that do not exist in file system

()

Source from the content-addressed store, hash-verified

128 * Removes entries that do not exist in file system
129 */
130 private static void cleanList(){
131 LinkedList<WorldFileEntry> toBeRemoved = new LinkedList<>();
132
133 for(WorldFileEntry entry: worldFileHistory){
134 if(!entry.getFile().exists()){
135 toBeRemoved.add(entry);
136 }
137 }
138
139 for(WorldFileEntry it: toBeRemoved){
140 worldFileHistory.remove(it);
141 }
142 }
143
144 // ------------------- list file handling ----------------------------------
145

Callers 2

readMethod · 0.95
writeMethod · 0.95

Calls 2

removeMethod · 0.65
getFileMethod · 0.45

Tested by

no test coverage detected