Share via


complete Function

Creates a complete path, if possible, from specified Path values.

template<class Path>
inline Path complete(
   const Path& Pval,
   const Path& Pbase = initial_path<Path>()
);

Parameters

  • Pval
    An object of type Path. Path can be either a basic_path or a type that's derived from basic_path.

  • Pbase
    An object of type Path. By default, the value is the current working directory on program startup.

Return Value

If Pval has a root name, the function returns Pval.

Otherwise, if Pval has a root directory, the function returns Pbase.root_name / Pval.

Otherwise, the function returns Pbase / Pval.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

basic_path::root_name Method

basic_path::root_directory Method

operator/ (STL)

Other Resources

Header Files