Changeset 115 for trunk


Ignore:
Timestamp:
Jun 30, 2006, 1:19:30 PM (15 years ago)
Author:
Peter Johansson
Message:

added pwd function

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility.cc

    r112 r115  
    3030#include <sstream>
    3131#include <string>
     32#include <sys/param.h>
    3233#include <sys/stat.h>
     34#include <unistd.h>
    3335
    3436namespace theplu{
     
    146148
    147149
     150  std::string pwd(void)
     151  {
     152    char buffer[MAXPATHLEN];
     153    getcwd(buffer, MAXPATHLEN);
     154    return std::string(buffer);
     155  }
     156
     157
     158
    148159}} // end of namespace svnstat and namespace theplu
  • trunk/lib/utility.h

    r112 r115  
    5959  ///
    6060  std::map<std::string, std::string> info(const std::string&);
     61
     62  ///
     63  /// @return the current working directory.
     64  ///
     65  std::string pwd(void);
    6166
    6267  ///
Note: See TracChangeset for help on using the changeset viewer.