Go to the documentation of this file.
59 template<
class T>
class List;
60 template<
class T>
class UList;
119 inline fileName(
const string&
s,
bool doStrip=
true);
122 inline fileName(
string&&
s,
bool doStrip=
true);
125 inline fileName(
const std::string&
s,
bool doStrip=
true);
128 inline fileName(std::string&&
s,
bool doStrip=
true);
131 inline fileName(
const char*
s,
bool doStrip=
true);
137 explicit fileName(std::initializer_list<word> list);
146 inline static bool valid(
char c);
159 const std::string& s1,
160 const std::string& s2,
161 const char delim =
'/'
166 static bool equals(
const std::string& s1,
const std::string& s2);
198 static bool clean(std::string& str);
218 Type type(
bool followLink=
true,
bool checkGzip=
false)
const;
221 inline static bool isAbsolute(
const std::string& str);
230 static bool isBackup(
const std::string& str);
254 inline static std::string
name(
const std::string& str);
261 static std::string
nameLessExt(
const std::string& str);
290 inline static std::string
path(
const std::string& str);
311 const bool caseTag =
false
326 inline bool hasExt()
const;
403 Istream&
operator>>(Istream& is, fileName& val);
406 Ostream&
operator<<(Ostream& os,
const fileName& val);
413 fileName
operator/(
const string& s1,
const string& s2);
419 fileName
search(
const word& file,
const fileName& directory);
wordList components(const char delim='/') const
Return path components as wordList.
A class for handling words, derived from Foam::string.
A class for handling file names.
static fileName validate(const std::string &s, const bool doClean=true)
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))
fileName path() const
Return directory path name (part before last /)
static int debug
Debugging.
bool isAbsolute() const
Return true if file name is absolute (starts with a '/')
Type
Enumerations to handle directory entry types.
word nameLessExt() const
Return basename, without extension.
static int allowSpaceInFileName
Allow space character in fileName. To be used with caution.
Istream & operator>>(Istream &, directionInfo &)
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?
fileName & toAbsolute()
Convert from relative to absolute.
fileName relative(const fileName &parent, const bool caseTag=false) const
bool isBackup() const
Return true if file name ends with "~", ".bak", ".old", ".save".
fileName & operator/=(const string &other)
Append a path element with '/' separator.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
word name() const
Return basename (part beyond last /), including its extension.
List< word > wordList
A List of words.
bool hasPath() const
Return true if it contains a '/' character.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
static const char *const typeName
The typeName.
bool hasExt() const
Return true if it has an extension or simply ends with a '.'.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool removeExt()
Remove extension, returning true if string changed.
Type type(bool followLink=true, bool checkGzip=false) const
word component(const size_type cmpt, const char delim='/') const
Return a single component of the path.
graph_traits< Graph >::vertices_size_type size_type
static bool equals(const std::string &s1, const std::string &s2)
fileName()=default
Construct null.
word ext() const
Return file name extension (part after last .)
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
void stripInvalid()
Strip invalid characters.
fileName & operator=(const fileName &str)
Copy assignment, no character validation required.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
static fileName concat(const std::string &s1, const std::string &s2, const char delim='/')
Join two strings with a path separator ('/' by default).
const dimensionedScalar c
Speed of light in a vacuum.
bool clean()
Cleanup filename inplace.
bool removePath()
Remove leading path, returning true if string changed.