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

Method isPCGenListFile

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

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

(final File file)

Source from the content-addressed store, hash-verified

123 * @see Constants#EXTENSION_LIST_FILE
124 */
125 public static boolean isPCGenListFile(final File file)
126 {
127 // A directory strangely named "fred.lst" is not a list file.
128 if (!file.isFile())
129 {
130 return false;
131 }
132
133 return getWindowsSafeFilename(file).endsWith(Constants.EXTENSION_LIST_FILE);
134 }
135
136 /**
137 * Checks if the given {@code file} is a PCGen character or party file based

Callers 1

testIsPCGenLstFileMethod · 0.95

Calls 1

Tested by 1

testIsPCGenLstFileMethod · 0.76