Go to the documentation of this file.
108 && (!
isspace(
c) || (allowSpaceInFileName &&
c ==
' '))
116 if (
debug && string::stripInvalid<fileName>(*
this))
119 <<
"fileName::stripInvalid() called for invalid fileName "
125 <<
" For debug level (= " <<
debug
126 <<
") > 1 this is considered fatal" <<
std::endl;
138 return !str.empty() &&
145 (str[0] ==
'/' || str[0] ==
'\\')
150 (str.length() > 2 && str[1] ==
':')
151 && (str[2] ==
'/' || str[2] ==
'\\')
160 return isAbsolute(*
this);
166 return isBackup(*
this);
178 const auto i = str.rfind(
'/');
186 return str.substr(0, i);
201 const auto i = str.rfind(
'/');
208 return str.substr(i+1);
226 return nameLessExt(*
this);
232 const auto i = find_ext();
int debug
Static debugging option.
A class for handling words, derived from Foam::string.
A class for handling file names.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool isspace(char c) noexcept
Test for whitespace (C-locale)
fileName path() const
Return directory path name (part before last /)
word nameLessExt() const
Return basename, without extension.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName lessExt() const
Return file name without extension (part before last .)
A class for handling character strings derived from std::string.
static bool valid(char c)
Is this character valid for a fileName?
bool isBackup() const
Return true if file name ends with "~", ".bak", ".old", ".save".
word name() const
Return basename (part beyond last /), including its extension.
bool hasPath() const
Return true if it contains a '/' character.
word ext() const
Return file name extension (part after last .)
bool hasPath() const
Return true if it contains a '/' character.
fileName()=default
Default construct.
word ext() const
Return file name extension (part after last .)
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool removePath()
Remove leading path, returning true if string changed.
void stripInvalid()
Strip invalid characters.
fileName & operator=(const fileName &str)
Copy assignment, no character validation required.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
const dimensionedScalar c
Speed of light in a vacuum.
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
Populate a field as the result of a unary operation on an input.
bool removePath()
Remove leading path, returning true if string changed.