OpenFOAM logo
Open Source CFD Toolkit

fileName Class Reference

Inheritance diagram for fileName:

Inheritance graph
[legend]
Collaboration diagram for fileName:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type { UNDEFINED, FILE, DIRECTORY, LINK }
 Enumerations to handle file types and modes. More...

Public Member Functions

 fileName ()
 Construct null.
 fileName (const fileName &fn)
 Construct as copy.
 fileName (const word &w)
 Construct as copy of word.
 fileName (const string &s)
 Construct as copy of string.
 fileName (const std::string &s)
 Construct as copy of std::string.
 fileName (const char *)
 Construct as copy of character array.
 fileName (const wordList &)
 Construct by concatonating elements of wordList separated by '/'.
 fileName (Istream &)
 Construct from Istream.
word name () const
 Return file name (part beyond last /).
fileName path () const
 Return directory path name (part before last /).
fileName lessExt () const
 Return file name without extension (part before last .).
word ext () const
 Return file name extension (part after last .).
wordList components (const char delimiter='/') const
 Return path components as wordList.
word component (const size_t, const char delimiter='/') const
 Return a component of the path.
Type type () const
 Return file type.
void operator= (const fileName &)
void operator= (const word &)
void operator= (const string &)
void operator= (const std::string &)
void operator= (const char *)

Static Public Member Functions

bool valid (char)
 Is this character valid for a fileName.

Static Public Attributes

int debug
 Debug switch.
const fileName null
 Null fileName.

Friends

Istreamoperator>> (Istream &, fileName &)
Ostreamoperator<< (Ostream &, const fileName &)

Member Enumeration Documentation

enum Type
 

Enumerations to handle file types and modes.

Enumeration values:
UNDEFINED 
FILE 
DIRECTORY 
LINK 

Definition at line 78 of file fileName.H.


Constructor & Destructor Documentation

fileName  )  [inline]
 

Construct null.

Definition at line 62 of file fileNameI.H.

fileName const fileName fn  )  [inline]
 

Construct as copy.

Definition at line 67 of file fileNameI.H.

fileName const word w  )  [inline]
 

Construct as copy of word.

Definition at line 72 of file fileNameI.H.

References string::stripInvalid().

Here is the call graph for this function:

fileName const string s  )  [inline]
 

Construct as copy of string.

Definition at line 78 of file fileNameI.H.

References string::stripInvalid().

Here is the call graph for this function:

fileName const std::string &  s  )  [inline]
 

Construct as copy of std::string.

Definition at line 86 of file fileNameI.H.

References string::stripInvalid().

Here is the call graph for this function:

fileName const char *   )  [inline]
 

Construct as copy of character array.

Definition at line 94 of file fileNameI.H.

References Foam::isspace().

Here is the call graph for this function:

fileName const wordList  )  [explicit]
 

Construct by concatonating elements of wordList separated by '/'.

fileName Istream  ) 
 

Construct from Istream.


Member Function Documentation

word component const   size_t,
const char  delimiter = '/'
const
 

Return a component of the path.

wordList components const char  delimiter = '/'  )  const
 

Return path components as wordList.

word ext  )  const
 

Return file name extension (part after last .).

fileName lessExt  )  const
 

Return file name without extension (part before last .).

word name  )  const
 

Return file name (part beyond last /).

void operator= const char *   ) 
 

void operator= const std::string &   ) 
 

void operator= const string  ) 
 

void operator= const word  ) 
 

void operator= const fileName  ) 
 

fileName path  )  const
 

Return directory path name (part before last /).

Type type  )  const
 

Return file type.

bool valid char   )  [inline, static]
 

Is this character valid for a fileName.

Definition at line 104 of file fileNameI.H.


Friends And Related Function Documentation

Ostream& operator<< Ostream ,
const fileName
[friend]
 

Istream& operator>> Istream ,
fileName
[friend]
 


Member Data Documentation

int debug [static]
 

Debug switch.

Reimplemented from string.

Definition at line 87 of file fileName.H.

const fileName null [static]
 

Null fileName.

Reimplemented from string.

Definition at line 90 of file fileName.H.


The documentation for this class was generated from the following files:
For further information go to www.openfoam.org