MCPcopy Create free account
hub / github.com/PCGen/pcgen / isPCGenCampaignFile

Method isPCGenCampaignFile

code/src/java/pcgen/io/PCGFile.java:86–95  ·  view source on GitHub ↗

Checks if the given file is a PCGen campaign file based on the file extension. @param file the file to test @return {true} if a PCGen campaign file @see Constants#EXTENSION_CAMPAIGN_FILE

(final File file)

Source from the content-addressed store, hash-verified

84 * @see Constants#EXTENSION_CAMPAIGN_FILE
85 */
86 private static boolean isPCGenCampaignFile(final File file)
87 {
88 // A directory strangely named "fred.pcc" is not a campaign file.
89 if (!file.isFile())
90 {
91 return false;
92 }
93
94 return getWindowsSafeFilename(file).endsWith(Constants.EXTENSION_CAMPAIGN_FILE);
95 }
96
97 /**
98 * Checks if the given {@code uri} is a PCGen campaign file based on the

Callers 3

readPccFilesMethod · 0.95
initRecursivePccFilesMethod · 0.95

Calls 3

getPathMethod · 0.80
equalsMethod · 0.65

Tested by

no test coverage detected