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:
@ -302,7 +302,7 @@ void Foam::dxSurfaceWriter<Type>::write
|
||||
{
|
||||
fileName surfaceDir(samplePath/timeDir);
|
||||
|
||||
if (!exists(surfaceDir))
|
||||
if (!isDir(surfaceDir))
|
||||
{
|
||||
mkDir(surfaceDir);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ void Foam::foamFileSurfaceWriter<Type>::write
|
||||
{
|
||||
fileName surfaceDir(samplePath/timeDir/surfaceName);
|
||||
|
||||
if (!exists(surfaceDir))
|
||||
if (!isDir(surfaceDir))
|
||||
{
|
||||
mkDir(surfaceDir);
|
||||
}
|
||||
@ -84,7 +84,7 @@ void Foam::foamFileSurfaceWriter<Type>::write
|
||||
fileName foamName(pTraits<Type>::typeName);
|
||||
fileName valuesDir(surfaceDir / (foamName + Field<Type>::typeName));
|
||||
|
||||
if (!exists(valuesDir))
|
||||
if (!isDir(valuesDir))
|
||||
{
|
||||
mkDir(valuesDir);
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ void Foam::rawSurfaceWriter<Type>::write
|
||||
{
|
||||
fileName surfaceDir(samplePath/timeDir);
|
||||
|
||||
if (!exists(surfaceDir))
|
||||
if (!isDir(surfaceDir))
|
||||
{
|
||||
mkDir(surfaceDir);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ void Foam::stlSurfaceWriter<Type>::write
|
||||
{
|
||||
fileName surfaceDir(samplePath/timeDir);
|
||||
|
||||
if (!exists(surfaceDir))
|
||||
if (!isDir(surfaceDir))
|
||||
{
|
||||
mkDir(surfaceDir);
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ void Foam::vtkSurfaceWriter<Type>::write
|
||||
{
|
||||
fileName surfaceDir(samplePath/timeDir);
|
||||
|
||||
if (!exists(surfaceDir))
|
||||
if (!isDir(surfaceDir))
|
||||
{
|
||||
mkDir(surfaceDir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user