Logo Search packages:      
Sourcecode: poco version File versions  Download package

void Poco::Path::pushDirectory ( const std::string &  dir  ) 

Returns the n'th directory in the directory list. If n == depth(), returns the filename.

Definition at line 476 of file Path.cpp.

Referenced by makeAbsolute(), makeDirectory(), parseUnix(), and resolve().

{
      if (!dir.empty() && dir != ".")
      {
#if defined(POCO_OS_FAMILY_VMS)
            if (dir == ".." || dir == "-")
            {
                  if (!_dirs.empty() && _dirs.back() != ".." && _dirs.back() != "-")
                        _dirs.pop_back();
                  else if (!_absolute)
                        _dirs.push_back(dir);
            }
            else _dirs.push_back(dir);
#else
            if (dir == "..")
            {
                  if (!_dirs.empty() && _dirs.back() != "..")
                        _dirs.pop_back();
                  else if (!_absolute)
                        _dirs.push_back(dir);
            }
            else _dirs.push_back(dir);
#endif
      }
}


Generated by  Doxygen 1.6.0   Back to index