File indexing completed on 2025-01-18 09:50:10
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PROCESS_V2_CWD_HPP
0007 #define BOOST_PROCESS_V2_CWD_HPP
0008
0009 #include <boost/process/v2/detail/config.hpp>
0010 #include <boost/process/v2/detail/throw_error.hpp>
0011
0012 #include <boost/process/v2/pid.hpp>
0013
0014 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0015
0016 namespace ext {
0017
0018 #if defined(BOOST_PROCESS_V2_WINDOWS)
0019 BOOST_PROCESS_V2_DECL filesystem::path cwd(HANDLE handle, error_code & ec);
0020 BOOST_PROCESS_V2_DECL filesystem::path cwd(HANDLE handle);
0021 #endif
0022
0023
0024
0025 BOOST_PROCESS_V2_DECL filesystem::path cwd(pid_type pid, error_code & ec);
0026 BOOST_PROCESS_V2_DECL filesystem::path cwd(pid_type pid);
0027
0028 template<typename Executor>
0029 BOOST_PROCESS_V2_DECL filesystem::path cwd(basic_process_handle<Executor> & handle, error_code & ec)
0030 {
0031 #if defined(BOOST_PROCESS_V2_WINDOWS)
0032 return cwd(handle.native_handle(), ec);
0033 #else
0034 return cwd(handle.id(), ec);
0035 #endif
0036 }
0037
0038 template<typename Executor>
0039 BOOST_PROCESS_V2_DECL filesystem::path cwd(basic_process_handle<Executor> & handle)
0040 {
0041 #if defined(BOOST_PROCESS_V2_WINDOWS)
0042 return cwd(handle.native_handle());
0043 #else
0044 return cwd(handle.id());
0045 #endif
0046 }
0047
0048
0049
0050 }
0051
0052 BOOST_PROCESS_V2_END_NAMESPACE
0053
0054 #if defined(BOOST_PROCESS_V2_HEADER_ONLY)
0055 #include <boost/process/v2/ext/impl/cwd.ipp>
0056 #endif
0057
0058 #endif