|
| | FileName (const FileName &)=default |
| | Copy construct. More...
|
| |
| | FileName (FileName &&)=default |
| | Move construct. More...
|
| |
| | FileName (const char *s) |
| | Construct as copy of character array. More...
|
| |
| | FileName (const std::string &s) |
| | Copy construct from std::string. More...
|
| |
| void | stripInvalid () |
| | Strip invalid characters. More...
|
| |
| void | operator= (const fileName &)=delete |
| |
| void | operator= (const word &)=delete |
| |
| void | operator= (const string &)=delete |
| |
| void | operator= (const std::string &)=delete |
| |
| void | operator= (const char *)=delete |
| |
| | fileName ()=default |
| | Construct null. 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...
|
| |
| void | stripInvalid () |
| | Strip invalid characters. More...
|
| |
| bool | clean () |
| | Cleanup filename inplace. More...
|
| |
| fileName | clean () const |
| | Cleanup filename. More...
|
| |
| Type | type (bool followLink=true, bool checkGzip=false) const |
| |
| bool | isAbsolute () const |
| | Return true if file name is absolute (starts with a '/') More...
|
| |
| fileName & | toAbsolute () |
| | Convert from relative to absolute. More...
|
| |
| bool | isBackup () const |
| | Return true if file name ends with "~", ".bak", ".old", ".save". More...
|
| |
| word | name () const |
| | Return basename (part beyond last /), including its extension. More...
|
| |
| word | nameLessExt () const |
| | Return basename, without extension. More...
|
| |
| word | name (const bool noExt) const |
| | Deprecated(2017-03) return basename, optionally without extension. More...
|
| |
| fileName | path () const |
| | Return directory path name (part before last /) More...
|
| |
| bool | hasPath () const |
| | Return true if it contains a '/' character. More...
|
| |
| bool | removePath () |
| | Remove leading path, returning true if string changed. More...
|
| |
| fileName | relative (const fileName &parent, const bool caseTag=false) const |
| |
| fileName | lessExt () const |
| | Return file name without extension (part before last .) 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...
|
| |
| bool | hasExt () const |
| | Return true if it has an extension or simply ends with a '.'. More...
|
| |
| bool | hasExt (const word &ending) const |
| | Return true if the extension is the same as the given ending. More...
|
| |
| bool | hasExt (const wordRe &ending) const |
| | Return true if the extension matches the given ending. More...
|
| |
| bool | removeExt () |
| | Remove extension, returning true if string changed. 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. 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...
|
| |
| | string ()=default |
| | Construct null. 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) |
| |
| string & | replaceAll (const std::string &s1, const std::string &s2, size_type pos=0) |
| |
| string & | replaceAny (const std::string &s1, const char c2, size_type pos=0) |
| |
| string & | expand (const bool allowEmpty=false) |
| |
| 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 | starts_with (const std::string &s) const |
| | True if string starts with the given prefix (cf. C++20) More...
|
| |
| bool | starts_with (const char c) const |
| | True if string starts with the given character (cf. C++20) More...
|
| |
| bool | ends_with (const std::string &s) const |
| | True if string ends with the given suffix (cf. C++20) More...
|
| |
| bool | ends_with (const char c) const |
| | True if string ends with the given character (cf. C++20) More...
|
| |
| size_type | count (const char c) const |
| |
| 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...
|
| |
| template<class String > |
| Foam::string | quotemeta (const std::string &str, const char quote) |
| |
|
| static bool | valid (char c) |
| | Is this character valid for an ensight file-name. More...
|
| |
| static bool | valid (char c) |
| | Is this character valid for a fileName? More...
|
| |
| static fileName | validate (const std::string &s, const bool doClean=true) |
| |
| 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) |
| |
| static bool | clean (std::string &str) |
| | Cleanup filename. More...
|
| |
| static bool | isAbsolute (const std::string &str) |
| | Return true if string starts with a '/'. More...
|
| |
| static bool | isBackup (const std::string &str) |
| | Return true if string ends with "~", ".bak", ".old", ".save". More...
|
| |
| static std::string | name (const std::string &str) |
| | Return basename (part beyond last /), including its extension. More...
|
| |
| static std::string | nameLessExt (const std::string &str) |
| | Return basename, without extension. More...
|
| |
| static std::string | path (const std::string &str) |
| | Return directory path name (part before last /) More...
|
| |
| template<class String > |
| static bool | valid (const std::string &str) |
| | Does the string contain valid characters only? More...
|
| |
| template<class String > |
| static bool | meta (const std::string &str, const char quote='\\') |
| | Does this string contain meta-characters? More...
|
| |
| template<class String > |
| static bool | stripInvalid (std::string &str) |
| | Strip invalid characters from the given string. More...
|
| |
| template<class String > |
| static String | validate (const std::string &str) |
| | Return a valid String from the given string. More...
|
| |
| template<class String > |
| static string | quotemeta (const std::string &str, const char quote='\\') |
| | Return a String with quoted meta-characters from the given string. More...
|
| |
|
| enum | Type { UNDEFINED = 0,
FILE = 1,
DIRECTORY = 2,
LINK = 4
} |
| | Enumerations to handle directory entry types. More...
|
| |
| 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 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...
|
| |
| 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 | hasPath () const |
| | Return true if it contains a '/' character. More...
|
| |
| bool | hasExt () const |
| | Return true if it has an extension or simply ends with a '.'. More...
|
| |
| bool | hasExt (const word &ending) const |
| | Return true if the extension is the same as the given ending. More...
|
| |
| bool | hasExt (const wordRe &ending) const |
| | Return true if the extension matches the given ending. More...
|
| |
| bool | removeExt () |
| | Remove extension, returning true if string changed. More...
|
| |
| bool | removePath () |
| | Remove leading path, returning true if string changed. More...
|
| |
| 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...
|
| |
Specification of a valid Ensight file-name.
Spaces must be quoted, no '*' wildcards, no '' (structured block continuation).
Overall line length within case file is limited to 1024, but this is not yet addressed.
- Note
- To assist windows usage, a colon (':') in the name is replaced with by an underscore.
Definition at line 60 of file ensightFileName.H.