| Disk ARchive 2.8.4 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
libdar::libdar_xform Class Reference
API

class implementing the dar_xform feature More...

`#include <libdar_xform.hpp>`

## Classes
class | i_libdar_xform
| class implementing the dar_xform feature More...

## Public Member Functions
| libdar_xform (const std::shared_ptr< user_interaction > &ui, const std::string &chem, const std::string &basename, const std::string &extension, const infinint &min_digits, const std::string &execute)
| the archive to transform is read from a set of slices
| libdar_xform (const std::shared_ptr< user_interaction > &dialog, const std::string &pipename)
| the archive to transform is read from a named pipe
| libdar_xform (const std::shared_ptr< user_interaction > &dialog, int filedescriptor)
| < if pipename is set to "-" reading from standard input
| libdar_xform (const libdar_xform &ref)=delete
| copy constructor is not allowed
| libdar_xform (libdar_xform &&ref) noexcept
| move constructor
libdar_xform & | operator= (const libdar_xform &ref)=delete
| assignment operator is not allowed
libdar_xform & | operator= (libdar_xform &&ref) noexcept
| move assignment operator
| ~libdar_xform ()
| destructor
void | xform_to (const std::string &path, const std::string &basename, const std::string &extension, bool allow_over, bool warn_over, const infinint &pause, const infinint &first_slice_size, const infinint &slice_size, const std::string &slice_perm, const std::string &slice_user, const std::string &slice_group, hash_algo hash, const infinint &min_digits, const std::string &execute)
| the resulting archive is a written to disk possibly multi-sliced
void | xform_to (int filedescriptor, const std::string &execute)
| the resulting archive is a single sliced archive sent to a filedescriptor

## Private Attributes
std::unique_ptr< i_libdar_xform > | pimpl

## Detailed Description

class implementing the dar_xform feature

Definition at line 44 of file libdar_xform.hpp.

## Constructor & Destructor Documentation

## ◆ libdar_xform() [1/3]

libdar::libdar_xform::libdar_xform | ( | const std::shared_ptr< user_interaction > & | ui,
|  | const std::string & | chem,
|  | const std::string & | basename,
|  | const std::string & | extension,
|  | const infinint & | min_digits,
|  | const std::string & | execute )

the archive to transform is read from a set of slices

Parameters

  [in] | ui | for user interaction, may be set to std::nullptr
  [in] | chem | the path where resides the archive
  [in] | basename | the basename of the archive
  [in] | extension | should be set to "dar" as always
  [in] | min_digits | the way slice number is written in files, use 0 if this feature was not used at creation time
  [in] | execute | command to execute before each new slice same substitution is available as archive_options_create::set_execute()

Referenced by libdar_xform(), libdar_xform(), operator=(), and operator=().

## ◆ libdar_xform() [2/3]

libdar::libdar_xform::libdar_xform | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | const std::string & | pipename )

the archive to transform is read from a named pipe

Parameters

  [in] | dialog | for user interaction, may be set to std::nullptr
  [in] | pipename | named pipe where to read the archive from (single sliced one)

## ◆ libdar_xform() [3/3]

libdar::libdar_xform::libdar_xform | ( | const std::shared_ptr< user_interaction > & | dialog,
|  | int | filedescriptor )

< if pipename is set to "-" reading from standard input

the archive to transform is read from a file descriptor open in read mode

Parameters

  [in] | dialog | for user interaction, may be set to std::nullptr
  [in] | filedescriptor | the filedescriptor to reading the archive from

## Member Function Documentation

## ◆ xform_to() [1/2]

void libdar::libdar_xform::xform_to | ( | const std::string & | path,
|  | const std::string & | basename,
|  | const std::string & | extension,
|  | bool | allow_over,
|  | bool | warn_over,
|  | const infinint & | pause,
|  | const infinint & | first_slice_size,
|  | const infinint & | slice_size,
|  | const std::string & | slice_perm,
|  | const std::string & | slice_user,
|  | const std::string & | slice_group,
|  | hash_algo | hash,
|  | const infinint & | min_digits,
|  | const std::string & | execute )

the resulting archive is a written to disk possibly multi-sliced

Parameters

  [in] | path | directory where to write the new archive to
  [in] | basename | archive base name to create
  [in] | extension | should be set to "dar" as always
  [in] | allow_over | whether to allow slice overwriting
  [in] | warn_over | whether to warn before overwriting a slice
  [in] | pause | the number of slice to pause asking the user for continuation. Set to zero to disable pausing
  [in] | first_slice_size | size of the first slice if different of the other. Set to zero to have the first slice having the same size as others
  [in] | slice_size | size of slices (except the first slice which may be different). set to zero if slicing is not wanted
  [in] | slice_perm | number written in octal corresponding to the permission of slices to create. if set to an empty string the slice permission will not be overriden and will follow the umask() value
  [in] | slice_user | user name or UID to assign slice to. Assuming the process has the permission/capabilities to change UID of files
  [in] | slice_group | group name or GID to assign slice to. Assuming the process has the permission/capabilities to change GID of files
  [in] | hash | hashing algorithm to rely on generate hash file for each slice. Use libdar::hash_algo::hash_none to disable this feature
  [in] | min_digits | numbering of slices in filename should be padded by as much zero to have no less than this number of digit. Use zero to disable this feature
  [in] | execute | command to execute after each slice has been completed. Same substitution is available as archive_options_create::set_execute

## ◆ xform_to() [2/2]

void libdar::libdar_xform::xform_to | ( | int | filedescriptor,
|  | const std::string & | execute )

the resulting archive is a single sliced archive sent to a filedescriptor

Parameters

  [in] | filedescriptor | file descriptor open in write mode to write the archive to
  [in] | execute | command to execute after the archive has been completed. same string substitution available as described in other xform_to method

## Member Data Documentation

## ◆ pimpl

std::unique_ptr<i_libdar_xform> libdar::libdar_xform::pimpl
| private

Definition at line 144 of file libdar_xform.hpp.

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

- libdar_xform.hpp