OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

fileName Class Reference

Inheritance diagram for fileName:

Inheritance graph
[legend]
Collaboration diagram for fileName:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 65 of file fileName.H.


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 concatenating 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

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

Static Public Attributes

static int debug
 Debug switch.
static const fileName null
 Null fileName.

Friends

Istream & operator>> (Istream &, fileName &)
Ostream & operator<< (Ostream &, const fileName &)

Member Enumeration Documentation

enum Type

Enumerations to handle file types and modes.

Enumerator:
UNDEFINED 
FILE 
DIRECTORY 
LINK 

Definition at line 78 of file fileName.H.


Constructor & Destructor Documentation

fileName (  )  [inline]

Construct null.

Definition at line 55 of file fileNameI.H.

fileName ( const fileName &  fn  )  [inline]

Construct as copy.

Definition at line 60 of file fileNameI.H.

fileName ( const word &  w  )  [inline]

Construct as copy of word.

Definition at line 65 of file fileNameI.H.

fileName ( const string &  s  )  [inline]

Construct as copy of string.

Definition at line 71 of file fileNameI.H.

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

Construct as copy of std::string.

Definition at line 79 of file fileNameI.H.

fileName ( const char *   )  [inline]

Construct as copy of character array.

Definition at line 87 of file fileNameI.H.

fileName ( const wordList &   )  [explicit]

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

fileName ( Istream &   ) 

Construct from Istream.


Member Function Documentation

bool valid ( char   )  [inline, static]

Is this character valid for a fileName.

Definition at line 97 of file fileNameI.H.

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 *   ) 


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
fileName &   
) [friend]

Ostream& operator<< ( Ostream &  ,
const 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: Copyright © 2000-2007 OpenCFD Ltd