mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support search modes for etcFiles()
- similar to the foamEtcFile script -mode=... option, the specific
search location (user/group/other) can now also specified for
string expansions and as a numerical value for etcFile()
For example, if searching for group or other (project) controlDict,
but not wishing to see the user controlDict:
1. foamEtcFile -mode=go controlDict
2. fileName dictFile("<etc:go>/controlDict");
dictFile.expand();
3. etcFile(controlDict, false, 0077);
The default behaviour for searching all contexts is unchanged.
1. foamEtcFile controlDict
2. fileName dictFile("<etc>/controlDict");
dictFile.expand();
3. etcFile(controlDict);
This commit is contained in:
@ -102,6 +102,13 @@ int main(int argc, char *argv[])
|
||||
:
|
||||
{
|
||||
"~OpenFOAM/controlDict", "<etc>/controlDict",
|
||||
"<etc:ugo>/controlDict",
|
||||
"<etc:u>/controlDict",
|
||||
"<etc:ug>/controlDict",
|
||||
"<etc:go>/controlDict",
|
||||
"<etc:o>/controlDict",
|
||||
"<etc:JUNK>/controlDict", // rubbish input
|
||||
"<etc:>/controlDict", // rubbish input
|
||||
"$FOAM_CASE/xyz", "<case>/xyz",
|
||||
"$FOAM_CASE/constant/xyz", "<constant>/xyz",
|
||||
"$FOAM_CASE/system/xyz", "<system>/xyz",
|
||||
|
||||
Reference in New Issue
Block a user