Skip to content

A C++ library that helps in developing Linux applications.

License

Notifications You must be signed in to change notification settings

udovin/WilcotCpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wilcot Cpp

Wilcot Cpp — a C++ library that helps in developing Linux applications.

What's supported?

  • Process creation;
  • Linux container creation;
  • Convenient testing utils;
  • Convenient working with filesystem;
  • Convenient working with console;
  • Streams and ring buffer.

Examples

Options parsing

// Create new option parser
wilcot::cli::OptionParser parser;
// Create arguments for options
wilcot::cli::ValueOption<std::string> inputFile("--input");
wilcot::cli::ValueOption<std::string> outputFile("--output");
// Add options to option parser
parser.addOption(inputFile.setArgument("path"));
parser.addOption(outputFile.setArgument("path"));
// Parse arguments passed to main
parser.parse(argc, argv);

Process creation

// Create new process instance
wilcot::os::Process process;
// Create an array for arguments
std::vector<std::string> arguments;
arguments.push_back("/bin/bash");
// Set path to program and execute arguments
process.setProgram("/bin/bash");
process.setArguments(arguments);
// Start process
process.start();
// Wait for process exit
process.wait();

About

A C++ library that helps in developing Linux applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages