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

Method isPCGenPartyFile

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

Checks if the given file is a PCGen party file based on the file extension. @param file the file to test @return {true} if the file exists and is a PCGen party file @see Constants#EXTENSION_PARTY_FILE

(final File file)

Source from the content-addressed store, hash-verified

64 * @see Constants#EXTENSION_PARTY_FILE
65 */
66 public static boolean isPCGenPartyFile(final File file)
67 {
68 // A directory strangely named "fred.pcp" is not a party file.
69 if (!file.isFile())
70 {
71 return false;
72 }
73
74 return getWindowsSafeFilename(file).endsWith(Constants.EXTENSION_PARTY_FILE);
75 }
76
77 /**
78 * Checks if the given {@code file} is a PCGen campaign file based on the

Callers 3

testIsPCGenPartyFileMethod · 0.95
loadPartyFromFileMethod · 0.95
exportPartyMethod · 0.95

Calls 1

Tested by 1

testIsPCGenPartyFileMethod · 0.76