CommonLib
Loading...
Searching...
No Matches
process.h
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4#include <optional>
5#include <vector>
6
7namespace hedgedev::csl::diag::process
8{
9 ///
10 /// Starts a process.
11 ///
12 /// \tparam T_args The string type for the arguments.
13 ///
14 /// \param in_path The path to the executable to start.
15 /// \param in_args The command line arguments to pass into the process.
16 /// \param in_work The working directory of the process.
17 ///
18 /// \returns `true` if the process was started successfully. Otherwise, `false`.
19 ///
20 template <typename T_args>
21 inline bool start(const std::filesystem::path& in_path, const std::vector<T_args>& in_args = {}, std::optional<std::filesystem::path> in_work = {});
22}
23
24#ifdef WIN32
25#include "os/process_win32.inl"
26#endif
bool start(const std::filesystem::path &in_path, const std::vector< T_args > &in_args, std::optional< std::filesystem::path > in_work)
Definition process_win32.inl:10
Definition process_win32.inl:8