head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.36; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.50; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.53.59; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.54; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# SGPath Class Reference

A class to hide path separator difference across platforms and assist in managing file system path names. More...

`#include <sg_path.hxx>`

List of all members.

## Public Methods
| SGPath ()
| Default constructor.
| SGPath (const string &p)
| Construct a path based on the starting path provided.
| ~SGPath ()
| Destructor.
void | set (const string &p)
| Set path to a new value.
SGPath & | operator= (const char *p)
void | append (const string &p)
| Append another piece to the existing path.
void | concat (const string &p)
| Concatenate a string to the end of the path without inserting a path separator.
string | dir ()
| Get the directory part of the path.
string | str () const
| Get the path string.
const char * | c_str ()
| Get the path string.
bool | exists () const
| Determine if file exists by attempting to fopen it.

## Detailed Description

A class to hide path separator difference across platforms and assist in managing file system path names.

Paths can be input in any platform format and will be converted automatically to the proper format.

Definition at line 57 of file sg_path.hxx.

## Constructor & Destructor Documentation

SGPath::SGPath | ( | const string & | p | ) |

  | Construct a path based on the starting path provided. Parameters:
  p | initial path

## Member Function Documentation

void SGPath::append | ( | const string & | p | ) |

  | Append another piece to the existing path. Inserts a path separator between the existing component and the new component. Parameters:
  p | additional path component
Definition at line 82 of file sg_path.cxx. Referenced by SGTime::init(), and SGTime::updateLocal().

const char* SGPath::c_str | ( |  | ) | `[inline]`

| Get the path string. Returns: path in "C" string (ptr to char array) form. Definition at line 111 of file sg_path.hxx. Referenced by SGTime::init(), and SGTime::updateLocal().

void SGPath::concat | ( | const string & | p | ) |

  | Concatenate a string to the end of the path without inserting a path separator. Parameters:
  p | addtional path suffix
Definition at line 97 of file sg_path.cxx.

string SGPath::dir | ( |  | ) |

| Get the directory part of the path. Returns: directory string Definition at line 108 of file sg_path.cxx.

bool SGPath::exists | ( |  | ) | const

| Determine if file exists by attempting to fopen it. Returns: true if file exists, otherwise returns false. Definition at line 117 of file sg_path.cxx.

void SGPath::set | ( | const string & | p | ) |

  | Set path to a new value. Parameters:
  p | new path
Definition at line 75 of file sg_path.cxx. Referenced by SGTime::updateLocal().

string SGPath::str | ( |  | ) | const`[inline]`

| Get the path string. Returns: path string Definition at line 106 of file sg_path.hxx. Referenced by SGBucket::gen_base_path(), and SGTime::init().

The documentation for this class was generated from the following files:

- sg_path.hxx
- sg_path.cxx

@ 1.3 log @Oops, try again. @ text @d350 1 a350 1