Check whether the given file meet the required conditions (supported by the library OR directory).
The File must also be readable and not hidden.
if (f.isHidden() || !f.canRead())
{
return false;
}
if (f.isDirectory())
{
return allowDirectories;
}
String ext = Utils.getExtension(f);
try
{
if (SupportedFileFormat.valueOf(ext.toUpperCase()) != null)
{
return true;
}
}
catch(IllegalArgumentException iae)
{
//Not known enum value
return false;
}
return false;