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

Path & Poco::Path::makeParent (  ) 

If the path contains no filename, the last directory becomes the filename.

Definition at line 388 of file Path.cpp.

Referenced by Poco::File::createDirectories(), and parent().

{
      if (_name.empty())
      {
            if (_dirs.empty())
            {
                  if (!_absolute)
                        _dirs.push_back("..");
            }
            else
            {
                  if (_dirs.back() == "..")
                        _dirs.push_back("..");
                  else
                        _dirs.pop_back();
            }
      }
      else
      {
            _name.clear();
            _version.clear();
      }
      return *this;
}


Generated by  Doxygen 1.6.0   Back to index