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

Path & Poco::Path::makeAbsolute ( const Path base  ) 

Makes the path absolute if it is relative. The current working directory is taken as base directory.

Definition at line 340 of file Path.cpp.

References _absolute, _device, _dirs, _node, makeDirectory(), and pushDirectory().

{
      if (!_absolute)
      {
            Path tmp = base;
            tmp.makeDirectory();
            for (StringVec::const_iterator it = _dirs.begin(); it != _dirs.end(); ++it)
            {
                  tmp.pushDirectory(*it);
            }
            _node     = tmp._node;
            _device   = tmp._device;
            _dirs     = tmp._dirs;
            _absolute = base._absolute;
      }
      return *this;
}


Generated by  Doxygen 1.6.0   Back to index