Disk ARchive: libdar::libdar_xform::i_libdar_xform Class Reference

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

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

class implementing the dar_xform feature More...

`#include <i_libdar_xform.hpp>`

Inherits libdar::mem_ui.

## Public Member Functions
| i_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
| i_libdar_xform (const std::shared_ptr< user_interaction > &dialog, const std::string &pipename)
| the archive to transform is read from a named pipe
| i_libdar_xform (const std::shared_ptr< user_interaction > &dialog, int filedescriptor)
| < if pipename is set to "-" reading from standard input
| i_libdar_xform (const i_libdar_xform &ref)=delete
| copy constructor is not allowed
| i_libdar_xform (i_libdar_xform &&ref) noexcept=default
| move constructor
i_libdar_xform & | operator= (const i_libdar_xform &ref)=delete
| assignment operator is not allowed
i_libdar_xform & | operator= (i_libdar_xform &&ref) noexcept=default
| move assignment operator
| ~i_libdar_xform ()=default
| 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
Public Member Functions inherited from libdar::mem_ui
| mem_ui (const std::shared_ptr< user_interaction > &dialog)
| constructor
| mem_ui (const mem_ui &ref)=default
| the copy constructor
| mem_ui (mem_ui &&ref) noexcept=default
| the move constructor
mem_ui & | operator= (const mem_ui &ref)=default
| assignement operator
mem_ui & | operator= (mem_ui &&ref) noexcept=default
| move operator
virtual | ~mem_ui () noexcept(false)
| destructor

## Private Member Functions
void | init_entrep ()
void | xform_to (generic_file *dst)

## Private Attributes
bool | can_xform
std::unique_ptr< generic_file > | source
std::unique_ptr< path > | src_path
| may be null when reading from a pipe
std::shared_ptr< entrepot_local > | entrep_src
std::shared_ptr< entrepot_local > | entrep_dst
bool | format_07_compatible
label | dataname

## Additional Inherited Members
Protected Member Functions inherited from libdar::mem_ui
user_interaction & | get_ui () const
| get access to the user_interaction object
std::shared_ptr< user_interaction > | get_pointer () const
| get access to the shared_ptr pointing to the user_interaction
void | change_ui (const std::shared_ptr< user_interaction > &new_dialog)
| change the user_interaction object

## Detailed Description

class implementing the dar_xform feature

Definition at line 44 of file i_libdar_xform.hpp.

## Constructor & Destructor Documentation

## ◆ i_libdar_xform() [1/3]

libdar::libdar_xform::i_libdar_xform::i_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 i_libdar_xform(), i_libdar_xform(), operator=(), and operator=().

## ◆ i_libdar_xform() [2/3]

libdar::libdar_xform::i_libdar_xform::i_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)

## ◆ i_libdar_xform() [3/3]

libdar::libdar_xform::i_libdar_xform::i_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::i_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::i_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

## ◆ can_xform

bool libdar::libdar_xform::i_libdar_xform::can_xform
| private

Definition at line 143 of file i_libdar_xform.hpp.

## ◆ dataname

label libdar::libdar_xform::i_libdar_xform::dataname
| private

Definition at line 149 of file i_libdar_xform.hpp.

## ◆ entrep_dst

std::shared_ptr<entrepot_local> libdar::libdar_xform::i_libdar_xform::entrep_dst
| private

Definition at line 147 of file i_libdar_xform.hpp.

## ◆ entrep_src

std::shared_ptr<entrepot_local> libdar::libdar_xform::i_libdar_xform::entrep_src
| private

Definition at line 146 of file i_libdar_xform.hpp.

## ◆ format_07_compatible

bool libdar::libdar_xform::i_libdar_xform::format_07_compatible
| private

Definition at line 148 of file i_libdar_xform.hpp.

## ◆ source

std::unique_ptr<generic_file> libdar::libdar_xform::i_libdar_xform::source
| private

Definition at line 144 of file i_libdar_xform.hpp.

## ◆ src_path

std::unique_ptr<path> libdar::libdar_xform::i_libdar_xform::src_path
| private

may be null when reading from a pipe

Definition at line 145 of file i_libdar_xform.hpp.

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

- i_libdar_xform.hpp