A class for handling file names. More...
Public Types | |
enum | Type { UNDEFINED = 0, FILE = 1, DIRECTORY = 2, SYMLINK = 4, LINK = SYMLINK } |
Enumerations to handle directory entry types. More... | |
Public Member Functions | |
fileName ()=default | |
Default construct. More... | |
fileName (const fileName &)=default | |
Copy construct. More... | |
fileName (fileName &&)=default | |
Move construct. More... | |
fileName (const word &s) | |
Copy construct from word. More... | |
fileName (word &&s) | |
Move construct from word. More... | |
fileName (const string &s, bool doStrip=true) | |
Copy construct from string. More... | |
fileName (string &&s, bool doStrip=true) | |
Move construct from string. More... | |
fileName (const std::string &s, bool doStrip=true) | |
Copy construct from std::string. More... | |
fileName (std::string &&s, bool doStrip=true) | |
Move construct from std::string. More... | |
fileName (const char *s, bool doStrip=true) | |
Copy construct from character array. More... | |
fileName (const UList< word > &list) | |
Construct by concatenating elements of wordList separated by '/'. More... | |
fileName (std::initializer_list< word > list) | |
Construct by concatenating words separated by '/'. More... | |
fileName (Istream &is) | |
Construct from Istream. More... | |
bool | assign (const token &tok) |
Assign from word or string token. More... | |
void | stripInvalid () |
Strip invalid characters. More... | |
bool | clean () |
Cleanup filename (inplace) More... | |
Type | type (bool followLink=true, bool checkGzip=false) const |
Return the directory entry type: UNDEFINED, FILE, DIRECTORY (or SYMLINK). More... | |
bool | isAbsolute () const |
Return true if filename is absolute, which means it starts with a '/' or '\' or (windows-only) with a filesystem-root. More... | |
fileName & | toAbsolute () |
Convert from relative to absolute. More... | |
bool | isBackup () const |
Return true if file name ends with "~", ".bak", ".old", ".save". More... | |
fileName | path () const |
Return directory path name (part before last /) More... | |
bool | has_path () const |
True if it contains a '/' character. More... | |
word | name () const |
Return basename (part beyond last /), including its extension. More... | |
fileName & | replace_name (const word &newName) |
Replace basename (part beyond last /) with a new name. More... | |
word | stem () const |
Return basename, without extension. More... | |
word | ext () const |
Return file name extension (part after last .) More... | |
fileName & | ext (const word &ending) |
Append a '.' and the ending, and return the object. More... | |
fileName & | replace_ext (const word &ending) |
Remove extension (if any) and append a new one. More... | |
fileName | lessExt () const |
Return file name without extension (part before last .) More... | |
fileName | relative (const fileName &parent, const bool caseTag=false) const |
Return a relative name by stripping off the parent directory where possible. More... | |
wordList | components (const char delim='/') const |
Return path components as wordList. More... | |
word | component (const size_type cmpt, const char delim='/') const |
Return a single component of the path or empty if out of range. More... | |
fileName & | operator= (const fileName &str) |
Copy assignment, no character validation required. More... | |
fileName & | operator= (fileName &&str) |
Move assignment, no character validation required. More... | |
fileName & | operator= (const word &str) |
Copy assignment, no character validation required. More... | |
fileName & | operator= (word &&str) |
Move assignment, no character validation required. More... | |
fileName & | operator= (const string &str) |
Copy assignment, stripping invalid characters. More... | |
fileName & | operator= (string &&str) |
Move assignment, stripping invalid characters. More... | |
fileName & | operator= (const std::string &str) |
Copy assignment, stripping invalid characters. More... | |
fileName & | operator= (std::string &&str) |
Move assignment, stripping invalid characters. More... | |
fileName & | operator= (const char *str) |
Copy, stripping invalid characters. More... | |
fileName & | operator/= (const string &other) |
Append a path element with '/' separator. More... | |
bool | hasPath () const |
Same as has_path() More... | |
bool | removePath () |
Same as remove_path() More... | |
bool | hasExt () const |
Same as has_ext() More... | |
bool | hasExt (const std::string &s) const |
Same as has_ext() More... | |
bool | removeExt () |
Same as remove_ext() More... | |
word | nameLessExt () const |
Same as stem() More... | |
word | name (const bool noExt) const |
Deprecated(2017-03) return basename, optionally without extension. More... | |
bool | remove_path () |
Remove leading path, return true if string changed. More... | |
bool | remove_ext () |
Remove extension, returning true if string changed. More... | |
bool | has_ext () const |
Various checks for extensions. More... | |
bool | has_ext (const char *ending) const |
Various checks for extensions. More... | |
bool | has_ext (const std::string &ending) const |
Various checks for extensions. More... | |
bool | has_ext (const wordRe &ending) const |
Various checks for extensions. More... | |
Public Member Functions inherited from string | |
string ()=default | |
Default construct. More... | |
string (const std::string &str) | |
Copy construct from std::string. More... | |
string (std::string &&str) | |
Move construct from std::string. More... | |
string (const char *str) | |
Construct as copy of character array. More... | |
string (const char *str, const size_type len) | |
Construct as copy with a maximum number of characters. More... | |
string (const char c) | |
Construct from a single character. More... | |
string (const size_type len, const char c) | |
Construct fill copies of a single character. More... | |
string (Istream &is) | |
Construct from Istream. More... | |
bool | match (const std::string &text) const |
Test for equality. More... | |
string & | replace (const std::string &s1, const std::string &s2, size_type pos=0) |
Replace first occurrence of sub-string s1 with s2, beginning at pos. More... | |
string & | replaceAll (const std::string &s1, const std::string &s2, size_type pos=0) |
Replace all occurrences of sub-string s1 with s2, beginning at pos in the string. More... | |
string & | replaceAny (const std::string &s1, const char c2, size_type pos=0) |
Replace any occurrence of s1 characters with c2, beginning at pos in the string. More... | |
string & | expand (const bool allowEmpty=false) |
Inplace expand initial tags, tildes, and all occurrences of environment variables as per stringOps::expand. More... | |
bool | removeRepeated (const char character) |
Remove repeated characters. More... | |
bool | removeStart (const std::string &text) |
Remove the given text from the start of the string. More... | |
bool | removeStart (const char c) |
Remove leading character, unless string is a single character. More... | |
bool | removeEnd (const std::string &text) |
Remove the given text from the end of the string. More... | |
bool | removeEnd (const char c) |
Remove trailing character, unless string is a single character. More... | |
void | swap (std::string &str) |
Swap contents. Self-swapping is a no-op. More... | |
bool | operator() (const std::string &text) const |
Test for equality. Allows use as a predicate. More... | |
bool | contains (char c) const noexcept |
True if string contains given character (cf. C++23) More... | |
bool | contains (const std::string &s) const noexcept |
True if string contains given [string view] substring (cf. C++23) More... | |
bool | contains (const char *s) const |
True if string contains given substring (cf. C++23) More... | |
bool | starts_with (char c) const |
True if string starts with given character (cf. C++20) More... | |
bool | starts_with (const std::string &s) const |
True if string starts with given [string view] prefix (C++20) More... | |
bool | starts_with (const char *s) const |
True if string starts with given prefix (C++20) More... | |
bool | ends_with (char c) const |
True if string ends with given character (cf. C++20) More... | |
bool | ends_with (const std::string &s) const |
True if string ends with given [string view] suffix (cf. C++20) More... | |
bool | ends_with (const char *s) const |
True if string ends with given suffix (cf. C++20) More... | |
size_type | count (const char c) const |
Count the number of occurrences of the specified character in the string. More... | |
bool | startsWith (const std::string &s) const |
Deprecated(2019-11) More... | |
bool | endsWith (const std::string &s) const |
Deprecated(2019-11) More... | |
bool | removeTrailing (const char c) |
Deprecated(2019-11) More... | |
Static Public Member Functions | |
static bool | valid (char c) |
Is this character valid for a fileName? More... | |
static fileName | validate (const std::string &, const bool doClean=true) |
Construct fileName without invalid characters, possibly applying other transformations such as changing the path separator, removing duplicate or trailing slashes, etc. More... | |
static fileName | concat (const std::string &s1, const std::string &s2, const char delim='/') |
Join two strings with a path separator ('/' by default). More... | |
static bool | equals (const std::string &s1, const std::string &s2) |
This is a specialized (possibly slower) version of compare() that ignores duplicate or trailing slashes. More... | |
static bool | clean (std::string &str) |
Cleanup filename string, possibly applies other transformations such as changing the path separator etc. More... | |
static bool | isAbsolute (const std::string &str) |
Return true if filename starts with a '/' or '\' or (windows-only) with a filesystem-root. More... | |
static bool | isBackup (const std::string &str) |
Return true if string ends with "~", ".bak", ".old", ".save". More... | |
static std::string | path (const std::string &str) |
Return directory path name (part before last /) More... | |
static std::string | name (const std::string &str) |
Return basename (part beyond last /), including its extension. More... | |
static std::string | stem (const std::string &str) |
Return the basename, without extension. More... | |
static std::string | nameLessExt (const std::string &s) |
Same as stem() More... | |
Static Public Member Functions inherited from string | |
static std::string::size_type | length (const char *s) |
Length of the character sequence (with nullptr protection) More... | |
static std::string::size_type | length (const std::string &s) |
The length of the string. More... | |
template<class StringType > | |
static bool | valid (const std::string &str) |
Does the string contain valid characters only? More... | |
template<class StringType > | |
static bool | stripInvalid (std::string &str) |
Strip invalid characters from the given string. More... | |
template<class StringType > | |
static StringType | validate (const std::string &str) |
Return a valid String from the given string. More... | |
Static Public Attributes | |
static const char *const | typeName = "fileName" |
The typeName. More... | |
static int | debug |
Debugging. More... | |
static int | allowSpaceInFileName |
Allow space character in fileName. To be used with caution. More... | |
static const fileName | null |
An empty fileName. More... | |
Static Public Attributes inherited from string | |
static const char *const | typeName = "string" |
The type name "string". More... | |
static int | debug |
The debug flag. More... | |
static const string | null |
An empty string. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from string | |
std::string::size_type | find_ext () const |
Find position of a file extension dot, return npos on failure. More... | |
word | ext () const |
Return file name extension (part after last .) More... | |
bool | ext (const word &ending) |
Append a '.' and the ending. More... | |
bool | has_ext () const |
Return true if it has an extension or simply ends with a '.'. More... | |
bool | has_ext (const char *ending) const |
Return true if the extension is the same as the given ending. More... | |
bool | has_ext (const std::string &ending) const |
Return true if the extension is the same as the given ending. More... | |
bool | has_ext (const wordRe &ending) const |
Return true if the extension matches the given ending. More... | |
bool | remove_path () |
Remove leading path, return true if string changed. More... | |
bool | remove_ext () |
Remove extension, return true if string changed. More... | |
Static Protected Member Functions inherited from string | |
static std::string::size_type | find_ext (const std::string &str) |
Find position of a file extension dot, return npos on failure. More... | |
template<class PrimitiveType > | |
static std::string::size_type | string_printf (std::string &output, const char *fmt, const PrimitiveType &val) |
A printf-style formatter for a primitive. More... | |
template<class PrimitiveType > | |
static std::string::size_type | string_printf (std::string &output, const std::string &fmt, const PrimitiveType &val) |
A printf-style formatter for a primitive. More... | |
A class for handling file names.
A fileName is a string of characters without whitespace or quotes. A fileName can be
The string::expand() method expands environment variables, etc,
Definition at line 72 of file fileName.H.
enum Type |
Enumerations to handle directory entry types.
Enumerator | |
---|---|
UNDEFINED | Undefined type. |
FILE | A regular file. |
DIRECTORY | A directory. |
SYMLINK | A symbolic link. |
LINK | Same as symlink. |
Definition at line 81 of file fileName.H.
|
default |
Default construct.
Copy construct from word.
Definition at line 26 of file fileNameI.H.
Move construct from word.
Definition at line 32 of file fileNameI.H.
Copy construct from string.
Definition at line 38 of file fileNameI.H.
References fileName::stripInvalid().
Move construct from string.
Definition at line 49 of file fileNameI.H.
References fileName::stripInvalid().
|
inline |
Copy construct from std::string.
Definition at line 60 of file fileNameI.H.
References fileName::stripInvalid().
|
inline |
Move construct from std::string.
Definition at line 71 of file fileNameI.H.
References fileName::stripInvalid().
|
inline |
Copy construct from character array.
Definition at line 82 of file fileNameI.H.
References fileName::stripInvalid().
Construct by concatenating elements of wordList separated by '/'.
Definition at line 310 of file fileName.C.
References reserve().
Construct by concatenating words separated by '/'.
Definition at line 330 of file fileName.C.
References reserve().
Construct from Istream.
Definition at line 27 of file fileNameIO.C.
bool assign | ( | const token & | tok | ) |
Assign from word or string token.
Definition at line 35 of file fileNameIO.C.
References Foam::FieldOps::assign(), token::isQuotedString(), token::isWord(), token::stringToken(), and token::wordToken().
Referenced by Foam::expandLeadingTag(), Foam::operator>>(), and fileName::replace_name().
|
inlinestatic |
Is this character valid for a fileName?
Definition at line 95 of file fileNameI.H.
References Foam::constant::universal::c, and Foam::isspace().
Referenced by FileName::valid().
|
static |
Construct fileName without invalid characters, possibly applying other transformations such as changing the path separator, removing duplicate or trailing slashes, etc.
Definition at line 199 of file fileName.C.
Referenced by Foam::argList::get< Foam::fileName >().
|
static |
Join two strings with a path separator ('/' by default).
No separator is added if either argument is an empty string or if the arguments already had the path separator at the junction. Invalid characters are not stripped (ie, retained).
Definition at line 211 of file fileName.C.
References string::length().
Referenced by dictionary::add(), dictionary::changeKeyword(), dictionary::dictionary(), and primitiveEntry::primitiveEntry().
|
static |
This is a specialized (possibly slower) version of compare() that ignores duplicate or trailing slashes.
Definition at line 238 of file fileName.C.
|
inline |
Strip invalid characters.
Definition at line 106 of file fileNameI.H.
References Foam::ensightOutput::debug, Foam::endl(), and Foam::exit().
Referenced by fileName::fileName().
|
static |
Cleanup filename string, possibly applies other transformations such as changing the path separator etc.
Changes back-slash to forward-slash path separator, while preserving windows UNC:
* \\server\abc\def --> \\server/abc/def *
Removes trailing slash:
* / --> / * /abc/ --> /abc *
Removes repeated slashes, but preserves UNC:
* /abc////def --> /abc/def * \\server\abc////def --> \\server/abc/def *
Removes "/./"
(current directory), except for leading one:
* /abc/def/./ghi/. --> /abc/def/ghi * abc/def/./ --> abc/def * ./abc/ --> ./abc *
Removes "/../"
(parent directory), except for leading one:
* /abc/def/../ghi/jkl/nmo/.. --> /abc/ghi/jkl * abc/../def/ghi/../jkl --> abc/../def/jkl *
Definition at line 192 of file fileName.C.
Referenced by dictionary::cfindScopedDict(), externalFileCoupler::externalFileCoupler(), IOobject::fileNameComponents(), averageNeighbourFvGeometryScheme::movePoints(), argList::parse(), abort::read(), MapFieldConstraint< Type >::read(), shortestPathSet::shortestPathSet(), and mappedPatchBase::subRegistry().
bool clean | ( | ) |
Cleanup filename (inplace)
Definition at line 385 of file fileName.C.
Referenced by dictionary::makeScopedDict(), and entry::New().
Foam::fileName::Type type | ( | bool | followLink = true , |
bool | checkGzip = false |
||
) | const |
Return the directory entry type: UNDEFINED, FILE, DIRECTORY (or SYMLINK).
followLink | when false it will return SYMLINK for a symlink rather than following it. |
checkGzip | add an additional test for a gzip FILE |
Definition at line 353 of file fileName.C.
Referenced by Foam::broadcastFile_recursive(), Foam::cp(), Foam::mv(), and fvMeshDistribute::printFieldInfo().
|
inlinestatic |
Return true if filename starts with a '/' or '\' or (windows-only) with a filesystem-root.
Definition at line 129 of file fileNameI.H.
Referenced by pointNoise::calculate(), surfaceNoise::calculate(), chemkinReader::chemkinReader(), Foam::ln(), loadLibrary(), argList::parse(), abort::read(), surfaceFormatsCore::relativeFilePath(), includeEtcEntry::resolveEtcFile(), includeEntry::resolveFile(), collatedFileOperation::writeObject(), and triSurfaceMesh::writeObject().
|
inline |
Return true if filename is absolute, which means it starts with a '/' or '\' or (windows-only) with a filesystem-root.
Definition at line 151 of file fileNameI.H.
Foam::fileName & toAbsolute | ( | ) |
Convert from relative to absolute.
As a side-effect, always performs a clean() to remove "/./" etc
Definition at line 370 of file fileName.C.
References Foam::cwd(), and f().
Referenced by Time::NewGlobalTime(), boundaryDataSurfaceReader::readField(), and boundaryDataSurfaceReader::readPoints().
|
static |
Return true if string ends with "~", ".bak", ".old", ".save".
Definition at line 279 of file fileName.C.
References Foam::dot(), and s.
|
inline |
Return true if file name ends with "~", ".bak", ".old", ".save".
Definition at line 157 of file fileNameI.H.
|
inlinestatic |
Return directory path name (part before last /)
The result normally corresponds to a Foam::fileName
Behaviour compared to /usr/bin/dirname:
* input path() dirname * ----- ------ ------- * "" "." "." * "abc" "." "." * "/" "/" "/" * "/abc" "/" "/" * "abc/def" "abc" "abc" * "/abc/def" "/abc" "/abc" * "/abc/def/" "/abc/def" "/abc" * "/abc/../def" "/abc/.." "/abc/.." *
Definition at line 169 of file fileNameI.H.
Referenced by fileMonitorWatcher::addWatch(), Foam::broadcastFile_single(), chemkinReader::chemkinReader(), dynamicCode::copyOrCreateFiles(), Foam::cp(), dynamicCode::createMakeFiles(), dynamicCode::createMakeOptions(), includeEntry::execute(), coordSetWriter::getExpectedPath(), coordSetWriter::getFieldPrefixedPath(), isoSurfacePoint::isoSurfacePoint(), seriesWriter::load(), Foam::mkDir(), Time::New(), Time::NewGlobalTime(), sceneWriter::open(), fileOperation::processorsPath(), surfMesh::removeFiles(), polyMesh::removeFiles(), faMesh::removeFiles(), seriesWriter::scan(), seriesWriter::write(), scene::write(), proxyWriter::write(), x3dWriter::write(), starcdWriter::write(), foamWriter::write(), rawWriter::write(), abaqusWriter::write(), vtkWriter::write(), nastranWriter::write(), vtmWriter::write(), rawWriter::writeBuffered(), csvWriter::writeBuffered(), gnuplotWriter::writeBuffered(), ensightWriter::writeCollated(), dynamicCode::writeDigest(), isoAdvection::writeIsoFaces(), triSurfaceMesh::writeObject(), distributedTriSurfaceMesh::writeObject(), Foam::vtk::writePointSet(), gnuplotWriter::writeTemplate(), csvWriter::writeTemplate(), rawWriter::writeTemplate(), foamWriter::writeTemplate(), xmgraceWriter::writeTemplate(), starcdWriter::writeTemplate(), nastranWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), abaqusWriter::writeTemplate(), x3dWriter::writeTemplate(), debugWriter::writeTemplate(), and ensightWriter::writeUncollated().
|
inline |
Return directory path name (part before last /)
Definition at line 186 of file fileNameI.H.
Referenced by entry::New().
|
inline |
True if it contains a '/' character.
Definition at line 163 of file fileNameI.H.
Referenced by Foam::dlOpen(), and fileName::hasPath().
|
inlinestatic |
Return basename (part beyond last /), including its extension.
The result normally corresponds to a Foam::word
Behaviour compared to /usr/bin/basename:
* input name() basename * ----- ------ -------- * "" "" "" * "abc" "abc" "abc" * "/" "" "/" * "/abc" "abc" "abc" * "abc/def" "def" "def" * "/abc/def" "def" "def" * "/abc/def/" "" "def" * "/abc/../def" "def" "def" *
Definition at line 192 of file fileNameI.H.
Referenced by fileMonitorWatcher::addWatch(), seriesWriter::append(), argList::argList(), dynamicCode::copyOrCreateFiles(), Foam::cp(), isoSurfaceTopo::isoSurfaceTopo(), CloudSubModelBase< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::localPath(), Foam::mv(), Time::New(), writeFile::newFile(), Time::NewGlobalTime(), processorPolyPatch::order(), fileOperation::processorsPath(), ensightCase::setTime(), triSurface::triSurfInstance(), abaqusWriter::write(), ensightWriter::writeCollated(), and nastranWriter::writeTemplate().
|
inline |
Return basename (part beyond last /), including its extension.
Definition at line 205 of file fileNameI.H.
Referenced by fileName::name(), entry::New(), and scene::write().
Foam::fileName & replace_name | ( | const word & | newName | ) |
Replace basename (part beyond last /) with a new name.
Definition at line 419 of file fileName.C.
References fileName::assign(), and string::length().
|
static |
Return the basename, without extension.
The result normally corresponds to a Foam::word
Definition at line 391 of file fileName.C.
References Foam::dot().
Referenced by dlLibraryTable::basename(), surfaceNoise::calculate(), seriesWriter::print(), seriesWriter::scan(), gnuplotWriter::writeBuffered(), gnuplotWriter::writeTemplate(), and nastranWriter::writeTemplate().
|
inline |
Return basename, without extension.
Definition at line 217 of file fileNameI.H.
Referenced by vtmWriter::append(), fileName::name(), and fileName::nameLessExt().
|
inline |
Return file name extension (part after last .)
Definition at line 211 of file fileNameI.H.
References string::ext().
Referenced by coordSetWriter::getExpectedPath(), coordSetWriter::getFieldPrefixedPath(), seriesWriter::load(), seriesWriter::print(), seriesWriter::scan(), FIREMeshWriter::write(), proxyWriter::write(), x3dWriter::write(), starcdWriter::write(), rawWriter::write(), abaqusWriter::write(), vtkWriter::write(), nastranWriter::write(), abaqusWriter::writeTemplate(), rawWriter::writeTemplate(), nastranWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().
|
inline |
Append a '.' and the ending, and return the object.
The '.' and ending will not be added when the ending is empty, or when the file name is empty or ended with a '/'.
Definition at line 223 of file fileNameI.H.
References string::ext().
|
inline |
Remove extension (if any) and append a new one.
Definition at line 230 of file fileNameI.H.
References string::ext(), and string::remove_ext().
Referenced by Foam::dlOpen(), sceneWriter::open(), and scene::write().
|
inline |
Return file name without extension (part before last .)
Definition at line 238 of file fileNameI.H.
Referenced by STARCDsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), STARCDsurfaceFormat< Face >::write(), STARCDedgeFormat::write(), Foam::vtk::writePointSet(), and abaqusWriter::writeTemplate().
Foam::fileName relative | ( | const fileName & | parent, |
const bool | caseTag = false |
||
) | const |
Return a relative name by stripping off the parent directory where possible.
parent | the parent directory |
caseTag | replace the parent with <case> for later use with expand(), or prefix <case> if the file name was not an absolute location |
Definition at line 443 of file fileName.C.
References f(), UList< T >::find(), and string::length().
Foam::wordList components | ( | const char | delim = '/' | ) | const |
Return path components as wordList.
Behaviour:
* input components() * ----- ------------ * "" () * "." (".") * "abc" ("abc") * "/abc" ("abc") * "abc/def" ("abc", "def") * "/abc/def" ("abc", "def") * "/abc/def/" ("abc", "def") *
Definition at line 532 of file fileName.C.
Referenced by mappedPatchBase::subRegistry().
Foam::word component | ( | const size_type | cmpt, |
const char | delim = '/' |
||
) | const |
Return a single component of the path or empty if out of range.
The location npos
returns the last component
Definition at line 552 of file fileName.C.
|
inline |
Copy assignment, no character validation required.
Self-assignment is a no-op.
Definition at line 253 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Move assignment, no character validation required.
Self-assignment is a no-op.
Definition at line 264 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Copy assignment, no character validation required.
Definition at line 275 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Move assignment, no character validation required.
Definition at line 282 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Copy assignment, stripping invalid characters.
Definition at line 289 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Move assignment, stripping invalid characters.
Definition at line 297 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Copy assignment, stripping invalid characters.
Definition at line 305 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Move assignment, stripping invalid characters.
Definition at line 313 of file fileNameI.H.
References Foam::FieldOps::assign().
|
inline |
Copy, stripping invalid characters.
Definition at line 321 of file fileNameI.H.
References Foam::FieldOps::assign().
Foam::fileName & operator/= | ( | const string & | other | ) |
Append a path element with '/' separator.
No '/' separator is added if this or the argument are empty.
Definition at line 577 of file fileName.C.
References s.
|
inline |
Same as has_path()
Definition at line 556 of file fileName.H.
References fileName::has_path().
|
inline |
Same as remove_path()
Definition at line 561 of file fileName.H.
References string::remove_path().
|
inline |
Same as has_ext()
Definition at line 566 of file fileName.H.
References string::has_ext().
|
inline |
Same as has_ext()
Definition at line 571 of file fileName.H.
References string::has_ext(), and s.
|
inline |
Same as remove_ext()
Definition at line 576 of file fileName.H.
References string::remove_ext().
|
inlinestatic |
Same as stem()
Definition at line 581 of file fileName.H.
References s, and fileName::stem().
|
inline |
Same as stem()
Definition at line 589 of file fileName.H.
References fileName::stem().
|
inline |
Deprecated(2017-03) return basename, optionally without extension.
Definition at line 597 of file fileName.H.
References fileName::name(), and fileName::stem().
|
inline |
Remove leading path, return true if string changed.
Definition at line 79 of file stringI.H.
Referenced by seriesWriter::append().
|
inline |
Remove extension, returning true if string changed.
Definition at line 93 of file stringI.H.
Referenced by fileWriter::open(), seriesWriter::scan(), and FIREMeshWriter::write().
|
inline |
Various checks for extensions.
Definition at line 43 of file stringI.H.
Referenced by vtmWriter::append(), Foam::dlOpen(), STLCore::isBinaryName(), seriesWriter::load(), seriesWriter::scan(), seriesWriter::write(), vtmWriter::write(), Foam::vtk::writePointSet(), and NURBS3DSurface::writeVTK().
|
static |
The typeName.
Definition at line 96 of file fileName.H.
|
static |
Debugging.
Definition at line 101 of file fileName.H.
|
static |
Allow space character in fileName. To be used with caution.
Definition at line 106 of file fileName.H.
|
static |
An empty fileName.
Definition at line 111 of file fileName.H.
Referenced by vtmWriter::add(), Time::dbDir(), functionObjectList::findDict(), masterUncollatedFileOperation::fileOrNullOp::operator()(), argList::parse(), sceneWriter::path(), syncObjects::read(), mappedPatchBase::readDatabase(), nullWriter::write(), vtkWriter::write(), proxyWriter::write(), mappedPatchBase::write(), rawWriter::writeTemplate(), xmgraceWriter::writeTemplate(), gnuplotWriter::writeTemplate(), csvWriter::writeTemplate(), nastranWriter::writeTemplate(), abaqusWriter::writeTemplate(), ensightWriter::writeTemplate(), vtkWriter::writeTemplate(), coordSetWriter::writeTemplate(), surfaceWriter::writeTemplate(), and gltfWriter::writeTemplate().