53 const bool checkVariants,
63 return find(
'/') == npos;
69 return find(
'/') != npos;
75 return !empty() && operator[](0) ==
'/';
99 if (top == string::npos)
115 char c = operator[](src++);
136 char c1 = operator[](src);
146 if (c1 ==
'.' && (src+1 >= maxLen ||
operator[](src+1) ==
'/'))
156 && (parent = this->rfind(
'/', nChar-2)) != string::npos
172 operator[](nChar++) = prev =
c;
176 if (nChar > 1 &&
operator[](nChar-1) ==
'/')
183 return (nChar != maxLen);
205 return substr(i+1, npos);
212 string cName = *
this;
214 const string caseStr(
getEnv(
"FOAM_CASE"));
224 return cName.
replace(i, caseStr.size(),
string(
"$FOAM_CASE"));
244 if (dot != npos && dot <= beg)
251 return substr(beg, npos);
255 return substr(beg, dot - beg);
288 if (i == npos || i == 0 ||
operator[](i) ==
'/')
303 if (i == npos || i == 0 ||
operator[](i) ==
'/')
309 return substr(i+1, npos);
320 while ((end = find(delimiter, beg)) != npos)
325 wrdList.
append(substr(beg, end-beg));
333 wrdList.
append(substr(beg, npos));
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.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
static const char *const typeName
tmp< fvMatrix< Type > > operator/(const fvMatrix< Type > &, const volScalarField::Internal &)
const dimensionedScalar c
Speed of light in a vacuum.
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)
wordList components(const char delimiter='/') const
Return path components as wordList.
fileType type(const bool checkVariants=true, const bool followLink=true) const
Return the file type: file, directory, undefined or.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool isName() const
Return true if file name is a name without a path.
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.
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.
fileType
Enumeration of file types.
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.
bool hasPath() const
Return true if file name has a path.
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
void operator=(const string &)
fileName lessExt() const
Return file name without extension (part before last .)
fileName cwd()
Return current working directory path name.
fileName path() const
Return directory path name (part before last /)
A class for handling character strings derived from std::string.
void operator=(const fileName &)