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

Method isPCGenCharacterFile

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

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

(final File file)

Source from the content-addressed store, hash-verified

44 * @see Constants#EXTENSION_CHARACTER_FILE
45 */
46 public static boolean isPCGenCharacterFile(final File file)
47 {
48 // A directory strangely named "fred.pcg" is not a character file.
49 if (!file.isFile())
50 {
51 return false;
52 }
53
54 return getWindowsSafeFilename(file).endsWith(Constants.EXTENSION_CHARACTER_FILE);
55 }
56
57 /**
58 * Checks if the given {@code file} is a PCGen party file based on the file

Callers 4

loadCharacterFromFileMethod · 0.95
exportCharacterMethod · 0.95

Calls 1

Tested by 1