MCPcopy Create free account
hub / github.com/Card-Forge/forge / read

Method read

forge-core/src/main/java/forge/deck/io/DeckStorage.java:79–92  ·  view source on GitHub ↗
(final File file)

Source from the content-addressed store, hash-verified

77 }
78
79 @Override
80 protected Deck read(final File file) {
81 final Map<String, List<String>> sections = FileSection.parseSections(FileUtil.readFile(file));
82 Deck result = DeckSerializer.fromSections(sections);
83
84 if (moveWronglyNamedDecks) {
85 adjustFileLocation(file, result);
86 }
87
88 if (result != null) {
89 result.setDirectory(file.getParent().substring(rootDir.length()));
90 }
91 return result;
92 }
93
94 private static void adjustFileLocation(final File file, final Deck result) {
95 if (result == null) {

Callers

nothing calls this directly

Calls 7

parseSectionsMethod · 0.95
readFileMethod · 0.95
fromSectionsMethod · 0.95
adjustFileLocationMethod · 0.95
setDirectoryMethod · 0.80
lengthMethod · 0.80
getParentMethod · 0.45

Tested by

no test coverage detected