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);
407 if (files[i] == file)
409 return directory/file;
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.
Type type() const
Return the file type: FILE, DIRECTORY or UNDEFINED.
static const fileName null
An empty fileName.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
static const char *const typeName
string caseName() const
Return file name (part beyond last /), subsitute for FOAM_CASE.
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
word name() const
Return file name (part beyond last /)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from string.
wordList components(const char delimiter='/') const
Return path components as wordList.
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.
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.
word component(const size_type, const char delimiter='/') const
Return a single component of the path.
graph_traits< Graph >::vertices_size_type size_type
bool isAbsolute() const
Return true if file name is absolute.
fileName & toAbsolute()
Convert from relative to absolute.
fileName lessExt() const
Return file name without extension (part before last .)
List< word > wordList
A List of words.
string & replace(const string &oldStr, const string &newStr, size_type start=0)
Replace first occurence of sub-string oldStr with newStr.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const dimensionedScalar c
Speed of light in a vacuum.
word ext() const
Return file name extension (part after last .)
fileName cwd()
Return current working directory path name.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
fileName path() const
Return directory path name (part before last /)
A class for handling character strings derived from std::string.
fileNameList readDir(const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true)
Read a directory and return the entries as a string list.
void operator=(const fileName &)
Type
Enumerations to handle file types and modes.