60 return !empty() && operator[](0) ==
'/';
84 if (top == string::npos)
100 char c = operator[](src++);
121 char c1 = operator[](src);
131 if (c1 ==
'.' && (src+1 >= maxLen ||
operator[](src+1) ==
'/'))
141 && (parent = this->rfind(
'/', nChar-2)) != string::npos
157 operator[](nChar++) = prev =
c;
161 if (nChar > 1 &&
operator[](nChar-1) ==
'/')
168 return (nChar != maxLen);
190 return substr(i+1, npos);
197 string cName = *
this;
199 const string caseStr(
getEnv(
"FOAM_CASE"));
209 return cName.
replace(i, caseStr.size(),
string(
"$FOAM_CASE"));
229 if (dot != npos && dot <= beg)
236 return substr(beg, npos);
240 return substr(beg, dot - beg);
273 if (i == npos || i == 0 ||
operator[](i) ==
'/')
288 if (i == npos || i == 0 ||
operator[](i) ==
'/')
294 return substr(i+1, npos);
305 while ((end = find(delimiter, beg)) != npos)
310 wrdList.
append(substr(beg, end-beg));
318 wrdList.
append(substr(beg, npos));
340 string::operator=(str);
346 string::operator=(str);
352 string::operator=(str);
359 string::operator=(str);
366 string::operator=(str);
408 if (files[i] == file)
410 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.
string caseName() const
Return file name (part beyond last /), subsitute 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.
const fileOperation & fileHandler()
Get current file handler.
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 occurence 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].
fileNameList readDir(const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true)
Read a directory and return the entries as a string list.
fileName path() const
Return directory path name (part before last /)
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
A class for handling character strings derived from std::string.
void operator=(const fileName &)
Type
Enumerations to handle file types and modes.