Hi Guys,
Iam trying to read a file from a directory as follows:
String name = new String(filePath + fileName + ".apr");
File file = new File(name);
My problem is that the file extension ".apr" could be in any case(For Example:- "apr","APR","Apr")
So my reading of the file fails if the file extension differs from ".apr" to any of the extension I listed above.
So in short when Iam reading a file,would like to ignore the case of the file extension.Cant rely just on the filename ignoring the file extension as there could be files with the same name but different file extension.
Is there any utility method in
java to do it or how could it be done....
Thanks
Pazzuzu