My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Pathname.h
Go to the documentation of this file.
1 // $Id: Pathname.h,v 1.1 2010/02/23 17:19:58 eml Exp $
2 
3 #ifndef GCP_UTIL_PATHNAME_H
4 #define GCP_UTIL_PATHNAME_H
5 
16 #include <iostream>
17 
18 namespace gcp {
19  namespace util {
20 
21  class Pathname {
22  public:
23 
27  Pathname();
28 
32  virtual ~Pathname();
33 
34  // Return an expanded version of the directory and filename,
35  // explicitly filling in for relative paths, symbolic home
36  // directories, and environment variables
37 
38  static std::string expand(std::string dir, std::string file);
39 
40  private:
41 
42  // Read the user name at the start of a directory name and
43  // replace it by the home directory of the user. Record the
44  // result in buffer[].
45 
46  static void expandHomeDir(char *dir, size_t buflen, char *buffer);
47 
48  // Read the environment variable at the start of a directory name
49  // and replace it by its value. Record the result in buffer[].
50 
51  static void expandEnvVar(char *dir, size_t buflen, char *buffer);
52 
53  }; // End class Pathname
54 
55  } // End namespace util
56 } // End namespace gcp
57 
58 
59 
60 #endif // End #ifndef GCP_UTIL_PATHNAME_H
Pathname()
Definition: Pathname.cc:17
virtual ~Pathname()
Definition: Pathname.cc:22
Definition: tVideoCapabilitiesEml.cc:67
static std::string expand(std::string dir, std::string file)
Definition: Pathname.cc:27
Definition: Pathname.h:21