49 fullName = searchDir/local;
60 searchDir =
getEnv(
"WM_PROJECT_SITE");
71 fullName = searchDir/
"etc"/local;
84 searchDir =
getEnv(
"WM_PROJECT_INST_DIR");
93 fullName = searchDir/
"site/etc"/local;
104 searchDir =
getEnv(
"WM_PROJECT_DIR");
105 if (
isDir(searchDir))
107 fileName fullName = searchDir/
"etc"/local;
132 if (
isDir(searchDir))
144 fullName = searchDir/
name;
159 searchDir =
getEnv(
"WM_PROJECT_SITE");
160 if (searchDir.size())
162 if (
isDir(searchDir))
174 fullName = searchDir/
"etc"/
name;
191 searchDir =
getEnv(
"WM_PROJECT_INST_DIR");
192 if (
isDir(searchDir))
204 fullName = searchDir/
"site/etc"/
name;
219 searchDir =
getEnv(
"WM_PROJECT_DIR");
220 if (
isDir(searchDir))
240 <<
"--> FOAM FATAL ERROR in Foam::findEtcFiles() :" 241 " could not find mandatory file\n '" string getEnv(const word &)
Return environment variable of given name.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName home()
Return home directory path name for the current user.
const char *const FOAMversion
fileNameList findEtcFiles(const fileName &, bool mandatory=false, bool findFirst=false)
Search for files from user/group/shipped directories.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
Functions to search 'etc' directories for configuration files etc.
void append(const T &)
Append an element at the end of the list.
fileName findEtcFile(const fileName &, bool mandatory=false)
Search for a file using findEtcFiles.
word name(const complex &)
Return a string representation of a complex.
fileNameList findEtcDirs(const fileName &local=fileName::null)
Search for directories from user/group/shipped directories.