Removes entries that do not exist in file system
()
| 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 |