OSspecific: altered file tests

- removed the previously added fileName type(), isDir(), isFile() methods.

- added optional bool parameter to isFile() function to explicitly
  enable/disable the check for gzip files.

- fixed minor bugginess where the default usage of isFile() would result in
  false positive matches.

- be slightly more stringent and use isDir() and isFile() instead of
  exists() function when we actually know the expected type.
This commit is contained in:
Mark Olesen
2009-02-06 10:25:41 +01:00
parent fb29e08539
commit ffd9bb08a8
23 changed files with 66 additions and 79 deletions

View File

@ -746,7 +746,8 @@ int main(int argc, char *argv[])
Pout<< "Reading commands from file " << batchFile << endl;
if (!exists(batchFile))
// we also cannot handle .gz files
if (!isFile(batchFile, false))
{
FatalErrorIn(args.executable())
<< "Cannot open file " << batchFile << exit(FatalError);