예제 #1
0
void path::set_parent_path(const path& p)
{
    _parts[0] = get_top_name();
    _parts[1] = p.get_full_name();
    //_checkParts(); // don't have to do this because 'path' guarentees checks
}
예제 #2
0
void path::set_relative_path(const path& p)
{
    _parts[0] = _parts[0].length()>0 && _parts[0][0]!=PATH_SEP ? _parts[0] : get_top_name();
    _parts[1] = p.get_full_name();
    //_checkParts(); // don't have to do this because 'path' guarentees checks
}
예제 #3
0
str path::get_relative_name(const path& p) const
{
    // must pass in fully-qualified names
    return _getRel(get_full_name(),p.get_full_name());
}