28 if( s.find(
' ') == std::string::npos )
34 m_args = osSplit( s ) ;
39 m_exe =
G::Path( m_args.at(0U) ) ;
40 std::rotate( m_args.begin() , m_args.begin()+1U , m_args.end() ) ;
46 if( m_exe !=
G::Path() && !osNativelyRunnable() )
56 if( add_wrapper && m_exe !=
G::Path() && !osNativelyRunnable() )
76 std::string(
"[") + m_exe.str() +
"] [" +
G::Str::join(
"] [",m_args) +
"]" :
77 std::string(
"[") + m_exe.str() +
"]" ;
82 m_args.push_back( arg ) ;
void add(const std::string &arg)
Adds a command-line argument.
std::vector< std::string > StringArray
A std::vector of std::strings.
StringArray args() const
Returns the command-line arguments.
ExecutableCommand(const std::string &command_line=std::string())
Constructor taking a complete command-line.
Path exe() const
Returns the executable.
std::string displayString() const
Returns a printable representation for logging and diagnostics.
static std::string join(const std::string &sep, const StringArray &strings)
Concatenates an array of strings with separators.
A Path object represents a file system path.