Given a string \"filename.conf\", how to I verify the extension part?
I need a cross platform solution.
I used PathFindExtension() function to know whether it is a valid tif file or not.
#include
bool A2iAWrapperUtility::isValidImageFile(string imageFile)
{
char * pStrExtension = ::PathFindExtension(imageFile.c_str());
if (pStrExtension != NULL && strcmp(pStrExtension, ".tif") == 0)
{
return true;
}
return false;
}