Disk ARchive  2.7.15
Full featured and portable backup and archiving tool
Public Member Functions | Private Attributes | List of all members
libdar::libdar_slave Class Reference

class implementing the dar_slave feature More...

#include <libdar_slave.hpp>

+ Collaboration diagram for libdar::libdar_slave:

Public Member Functions

 libdar_slave (std::shared_ptr< user_interaction > &dialog, const std::string &folder, const std::string &basename, const std::string &extension, bool input_pipe_is_fd, const std::string &input_pipe, bool output_pipe_is_fd, const std::string &output_pipe, const std::string &execute, const infinint &min_digits)
 libdar_slave constructor More...
 
 libdar_slave (const libdar_slave &ref)=delete
 
 libdar_slave (libdar_slave &&ref) noexcept=default
 
libdar_slaveoperator= (const libdar_slave &ref)=delete
 
libdar_slaveoperator= (libdar_slave &&ref) noexcept=default
 
void run ()
 enslave this object to the dar process through the created pipes More...
 

Private Attributes

std::unique_ptr< i_libdar_slave > pimpl
 

Detailed Description

class implementing the dar_slave feature

Definition at line 45 of file libdar_slave.hpp.

Constructor & Destructor Documentation

◆ libdar_slave()

libdar::libdar_slave::libdar_slave ( std::shared_ptr< user_interaction > &  dialog,
const std::string &  folder,
const std::string &  basename,
const std::string &  extension,
bool  input_pipe_is_fd,
const std::string &  input_pipe,
bool  output_pipe_is_fd,
const std::string &  output_pipe,
const std::string &  execute,
const infinint min_digits 
)

libdar_slave constructor

Parameters
[in]dialogfor user interaction. Can be set to nullptr
[in]folderis the directory where resides the backup to read
[in]basenameis the backup basename
[in]extensionshould be set to "dar"
[in]input_pipe_is_fdif true the input_pipe argument is expected to be an integer (a file descriptor open for reading)
[in]input_pipeis the name of the pipe order will come from or a filedescriptor if input_pipe_is_fd is true
[in]output_pipe_is_fdif true the output_pipe argument is expected to be an integer (a file descriptor open for writing)
[in]output_pipeis the name of the pipe to send data to dar or a filedescriptor depending on output_pipe_is_fd value
[in]executeis a command to execute before reading a new slice, same macro substition is available as libdar::archive::set_execute()
[in]min_digitsminimum digits used to create the archive. Set it to zero if this option was not used at archive creation time
Note
if input_pipe is an empty string stdin is used
if output_pipe is an empty string stdout is used

Member Function Documentation

◆ run()

void libdar::libdar_slave::run ( )

enslave this object to the dar process through the created pipes

Note
run() will return when dar will no more need of this slave. if you need to abort this run(), let dar abort properly this will do the expected result properly.

The documentation for this class was generated from the following file: