crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
crawlservpp::Helper::System Namespace Reference

Namespace for global system helper functions. More...

Functions

std::string exec (const char *cmd)
 Executes a system command and returns the stdout of the program. More...
 

Constants

constexpr auto cmdBufferLength {128}
 The length of the buffer for executing system commands. More...
 

Detailed Description

Namespace for global system helper functions.

Function Documentation

◆ exec()

std::string crawlservpp::Helper::System::exec ( const char *  cmd)
inline

Executes a system command and returns the stdout of the program.

At the moment, this function is used exclusively by Helper::Portability::enumLocales().

Warning
Not compliant with ENV33-C. Do not call system()!
Returns
A string containing the output the program has written to stdout.
Exceptions
Main::Exceptionif the execution of the command failed.

Referenced by crawlservpp::Helper::Portability::enumLocales().

Variable Documentation

◆ cmdBufferLength

constexpr auto crawlservpp::Helper::System::cmdBufferLength {128}
inline

The length of the buffer for executing system commands.