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 '"
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A class for handling file names.
Functions to search 'etc' directories for configuration files etc.
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const char *const FOAMversion
fileName findEtcFile(const fileName &, bool mandatory=false)
Search for a file using findEtcFiles.
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
string getEnv(const word &)
Return environment variable of given name.
fileNameList findEtcFiles(const fileName &, bool mandatory=false, bool findFirst=false)
Search for files from user/group/shipped directories.
fileNameList findEtcDirs(const fileName &local=fileName::null)
Search for directories from user/group/shipped directories.
fileName home()
Return home directory path name for the current user.