Agreed, this is just silly. why not make getFileName() just return the string without extension. then, there would be a method to return all the different permutations without having to do weird coding.
getBaseName()
getExtention()
getFileName()
although due to nomenclature it might make more sense to have getBaseName() return the file name without extension, since getFileName() would kinda suggest it has a file extension on it.