59 return !empty() && operator[](0) ==
'/';
83 if (top == string::npos)
99 char c = operator[](src++);
120 char c1 = operator[](src);
130 if (c1 ==
'.' && (src+1 >= maxLen ||
operator[](src+1) ==
'/'))
140 && (parent = this->rfind(
'/', nChar-2)) != string::npos
156 operator[](nChar++) = prev =
c;
160 if (nChar > 1 &&
operator[](nChar-1) ==
'/')
167 return (nChar != maxLen);
189 return substr(i+1, npos);
196 string cName = *
this;
198 const string caseStr(
getEnv(
"FOAM_CASE"));
208 return cName.
replace(i, caseStr.size(),
string(
"$FOAM_CASE"));
228 if (dot != npos && dot <= beg)
235 return substr(beg, npos);
239 return substr(beg, dot - beg);
272 if (i == npos || i == 0 ||
operator[](i) ==
'/')
287 if (i == npos || i == 0 ||
operator[](i) ==
'/')
293 return substr(i+1, npos);
304 while ((end = find(delimiter, beg)) != npos)
309 wrdList.
append(substr(beg, end-beg));
317 wrdList.
append(substr(beg, npos));
339 string::operator=(str);
345 string::operator=(str);
351 string::operator=(str);
358 string::operator=(str);
365 string::operator=(str);
string getEnv(const word &)
Return environment variable of given name.
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
fileName()
Construct null.
bool clean()
Cleanup file name.
string caseName() const
Return file name (part beyond last /), substitute for FOAM_CASE.
static const fileName null
An empty fileName.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
static const char *const typeName
word ext() const
Return file name extension (part after last .)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Type type(const bool followLink=true) const
Return the file type: FILE, DIRECTORY, UNDEFINED or.
wordList components(const char delimiter='/') const
Return path components as wordList.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
bool isAbsolute() const
Return true if file name is absolute.
A class for handling words, derived from string.
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container as a plain List.
word name() const
Return file name (part beyond last /)
triSurfaceToAgglom resize(surfacesMesh.size())
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
static const word null
An empty word.
graph_traits< Graph >::vertices_size_type size_type
word component(const size_type, const char delimiter='/') const
Return a single component of the path.
fileName & toAbsolute()
Convert from relative to absolute.
List< word > wordList
A List of words.
string & replace(const string &oldStr, const string &newStr, size_type start=0)
Replace first occurrence of sub-string oldStr with newStr.
const dimensionedScalar c
Speed of light in a vacuum.
fileName lessExt() const
Return file name without extension (part before last .)
fileName cwd()
Return current working directory path name.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
fileName path() const
Return directory path name (part before last /)
A class for handling character strings derived from std::string.
void operator=(const fileName &)
Type
Enumerations to handle file types and modes.