mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -55,24 +55,6 @@ Foam::fileName::Type Foam::fileName::type() const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fileName::exists() const
|
||||
{
|
||||
return ::Foam::exists(*this);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fileName::isDir() const
|
||||
{
|
||||
return ::Foam::isDir(*this);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fileName::isFile() const
|
||||
{
|
||||
return ::Foam::isFile(*this);
|
||||
}
|
||||
|
||||
|
||||
// Return file name (part beyond last /)
|
||||
//
|
||||
// behaviour compared to /usr/bin/basename:
|
||||
|
||||
@ -134,15 +134,6 @@ public:
|
||||
//- Return the file type: FILE, DIRECTORY or UNDEFINED
|
||||
Type type() const;
|
||||
|
||||
//- Does it exist (as FILE or DIRECTORY) in the file system?
|
||||
bool exists() const;
|
||||
|
||||
//- Does it exist as DIRECTORY in the file system?
|
||||
bool isDir() const;
|
||||
|
||||
//- Does it exist as FILE in the file system?
|
||||
bool isFile() const;
|
||||
|
||||
// Decomposition
|
||||
|
||||
//- Return file name (part beyond last /)
|
||||
|
||||
Reference in New Issue
Block a user