Figure 2: A class for representing directories

class Directory
{
   string curr_path;
public:
   Directory(const string &cp) : curr_path(cp) {}
   string getCurrentPath() const {return curr_path;}
   bool setCurrentPath(const string &cp);
   bool pathIsValid() const;
   bool getSubdirNames(vector<string> &sbn) const;
   bool getFileNames(vector<string> &fn) const;
};