1
0
mirror of https://github.com/openSUSE/snapper.git synced 2026-02-07 03:47:11 +01:00
Files
snapper/examples/c++-lib/Create.cc
2015-02-16 11:59:34 +01:00

28 lines
415 B
C++

#include <unistd.h>
#include <sys/types.h>
#include <stdlib.h>
#include <iostream>
#include <snapper/Snapper.h>
using namespace snapper;
using namespace std;
int
main(int argc, char** argv)
{
Snapper* sh = new Snapper("root", "/");
SCD scd;
scd.uid = getuid();
scd.description = "test";
scd.cleanup = "number";
sh->createSingleSnapshot(scd);
delete sh;
exit(EXIT_SUCCESS);
}