mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
OSspecific: isDir(), isFile() instead of dir(), file()
This commit is contained in:
@ -228,7 +228,7 @@ Foam::vtkPV3Foam::vtkPV3Foam
|
||||
// avoid argList and get rootPath/caseName directly from the file
|
||||
fileName fullCasePath(fileName(FileName).path());
|
||||
|
||||
if (!dir(fullCasePath))
|
||||
if (!isDir(fullCasePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -518,7 +518,7 @@ double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps)
|
||||
|
||||
if
|
||||
(
|
||||
file(runTime.path()/timeName/meshDir_/"points")
|
||||
isFile(runTime.path()/timeName/meshDir_/"points")
|
||||
&& IOobject("points", timeName, meshDir_, runTime).headerOk()
|
||||
)
|
||||
{
|
||||
|
||||
@ -194,7 +194,7 @@ void Foam::vtkFoam::updateSelectedRegions()
|
||||
// Read the selected patches and add to the region list
|
||||
for (int i=0; i<nRegions; i++)
|
||||
{
|
||||
selectedRegions_[i] =
|
||||
selectedRegions_[i] =
|
||||
reader_->GetRegionSelection()->GetArraySetting(i);
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ void Foam::vtkFoam::convertMesh()
|
||||
else
|
||||
{
|
||||
// A patch already existent in the list and which
|
||||
// continues to exist found
|
||||
// continues to exist found
|
||||
regioni++;
|
||||
}
|
||||
}
|
||||
@ -391,7 +391,7 @@ Foam::vtkFoam::vtkFoam(const char* const FileName, vtkFoamReader* reader)
|
||||
{
|
||||
fileName fullCasePath(fileName(FileName).path());
|
||||
|
||||
if (!dir(fullCasePath))
|
||||
if (!isDir(fullCasePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -572,7 +572,7 @@ void Foam::vtkFoam::Update()
|
||||
{
|
||||
Info<< "Reading Mesh" << endl;
|
||||
}
|
||||
meshPtr_ =
|
||||
meshPtr_ =
|
||||
new fvMesh
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -47,7 +47,7 @@ int USERD_set_filenames
|
||||
}
|
||||
caseDir = tmp;
|
||||
|
||||
if (!dir(rootDir/caseDir))
|
||||
if (!isDir(rootDir/caseDir))
|
||||
{
|
||||
Info<< rootDir/caseDir << " is not a valid directory."
|
||||
<< endl;
|
||||
@ -144,7 +144,7 @@ int USERD_set_filenames
|
||||
}
|
||||
isTensor[n] = isitTensor;
|
||||
}
|
||||
|
||||
|
||||
bool lagrangianNamesFound = false;
|
||||
label n = 0;
|
||||
while (!lagrangianNamesFound && n < Num_time_steps)
|
||||
@ -176,7 +176,7 @@ int USERD_set_filenames
|
||||
Info << "[Found lagrangian]" << endl;
|
||||
|
||||
delete sprayPtr;
|
||||
|
||||
|
||||
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
|
||||
|
||||
IOobjectList objects(*meshPtr, runTime.timeName(), "lagrangian");
|
||||
|
||||
@ -132,8 +132,8 @@ static void errorMsg(const string& msg)
|
||||
// Simple check if directory is valid case directory.
|
||||
static bool validCase(const fileName& rootAndCase)
|
||||
{
|
||||
//if (dir(rootAndCase/"system") && dir(rootAndCase/"constant"))
|
||||
if (dir(rootAndCase/"constant"))
|
||||
//if (isDir(rootAndCase/"system") && isDir(rootAndCase/"constant"))
|
||||
if (isDir(rootAndCase/"constant"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -528,7 +528,7 @@ void user_query_file_function
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fileName rootDir(rootAndCase.path());
|
||||
|
||||
Reference in New Issue
Block a user