Disk ARchive  2.6.5
Full featured and portable backup and archiving tool
archive_options_listing_shell.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2019 Denis Corbin
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 #ifndef ARCHIVE_OPTIONS_LISTING_SHELL_HPP
27 #define ARCHIVE_OPTIONS_LISTING_SHELL_HPP
28 
29 #include "../my_config.h"
30 #include "archive_options.hpp"
31 
32 namespace libdar
33 {
34 
37 
38 
39  // ///////////////////////////////////////////////////////
40  // //// OPTIONS FOR LISTING AN ARCHIVE AS IN SHELL ///////
41  // ///////////////////////////////////////////////////////
42 
44 
48  {
49  public:
50  archive_options_listing_shell() { clear(); };
53  archive_options_listing_shell & operator = (const archive_options_listing_shell & ref) = default;
54  archive_options_listing_shell & operator = (archive_options_listing_shell && ref) noexcept = default;
55  ~archive_options_listing_shell() = default;
56 
57  virtual void clear() override;
58 
60 
62  {
64  tree,
65  xml,
67  };
68 
69 
71  // setting methods
72 
73  void set_list_mode(listformat list_mode) { x_list_mode = list_mode; set_slicing_location(list_mode == slicing); };
74  void set_sizes_in_bytes(bool arg) { x_sizes_in_bytes = arg; };
75 
77  // getting methods
78 
79  listformat get_list_mode() const { return x_list_mode; };
80  bool get_sizes_in_bytes() const { return x_sizes_in_bytes; };
81 
82  private:
83  listformat x_list_mode;
84  bool x_sizes_in_bytes;
85  };
86 
88 
89 } // end of namespace
90 
91 #endif
the original dar's tree listing (for those that like forest)
the slicing output (give info about where files are located)
void set_slicing_location(bool val)
whether to calculate the slice location of each file
this file contains a set of classes used to transmit options to archive operation ...
the tar-like listing (this is the default)
class holding optional shell specific parameters used to list the contents of an existing archive ...
class holding optional parameters used to list the contents of an existing archive ...
listformat
defines the way archive listing is done:
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:46