Go to the documentation of this file.
62 template<
class T>
class List;
63 template<
class T>
class UList;
123 inline fileName(
const string&
s,
bool doStrip=
true);
126 inline fileName(
string&&
s,
bool doStrip=
true);
129 inline fileName(
const std::string&
s,
bool doStrip=
true);
132 inline fileName(std::string&&
s,
bool doStrip=
true);
135 inline fileName(
const char*
s,
bool doStrip=
true);
141 explicit fileName(std::initializer_list<word> list);
157 inline static bool valid(
char c);
170 const std::string& s1,
171 const std::string& s2,
172 const char delim =
'/'
177 static bool equals(
const std::string& s1,
const std::string& s2);
218 static bool clean(std::string& str);
233 Type type(
bool followLink=
true,
bool checkGzip=
false)
const;
237 inline static bool isAbsolute(
const std::string& str);
248 static bool isBackup(
const std::string& str);
272 inline static std::string
name(
const std::string& str);
279 static std::string
nameLessExt(
const std::string& str);
308 inline static std::string
path(
const std::string& str);
329 const bool caseTag =
false
416 Istream&
operator>>(Istream& is, fileName& val);
426 fileName
operator/(
const string& s1,
const string& s2);
432 fileName
search(
const word& file,
const fileName& directory);
bool hasExt() const
Return true if it has an extension or simply ends with a '.'.
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.
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 removeExt()
Remove extension, returning true if string changed.
fileName path() const
Return directory path name (part before last /)
static int debug
Debugging.
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 &)
A token holds an item read from Istream.
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.
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)
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
static const char *const typeName
The typeName.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
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 or empty if out of range.
graph_traits< Graph >::vertices_size_type size_type
static bool equals(const std::string &s1, const std::string &s2)
OBJstream os(runTime.globalPath()/outputName)
fileName()=default
Default construct.
static fileName validate(const std::string &, const bool doClean=true)
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.
Hashing functor for string and derived string classes.
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.
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 clean()
Cleanup filename (inplace)
bool assign(const token &tok)
Assign from word or string token.
bool removePath()
Remove leading path, returning true if string changed.