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)
| 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 |