This documentation is archived and is not being maintained.

current_path Function

Sets or retrieves the current working directory.

Important note Important

This API cannot be used in applications that execute in the Windows Runtime.

template<class Path>
   inline Path current_path();
template<class Path>
   inline void current_path(const Path& Pval);


A Path object. Path can be either a basic_path or a type that is derived from basic_path.

The first function returns the current working directory.

The second function sets the current working directory to Pval.

Header: filesystem

Namespace: std::tr2::sys