Loading...
Searching...
No Matches
archive_options_listing_shell.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef ARCHIVE_OPTIONS_LISTING_SHELL_HPP
#define ARCHIVE_OPTIONS_LISTING_SHELL_HPP
#include "../my_config.h"
#include "archive_options.hpp"
namespace libdar
{
// ///////////////////////////////////////////////////////
// //// OPTIONS FOR LISTING AN ARCHIVE AS IN SHELL ///////
// ///////////////////////////////////////////////////////
class archive_options_listing_shell: public archive_options_listing
{
public:
archive_options_listing_shell() { clear(); };
archive_options_listing_shell(const archive_options_listing_shell & ref) = default;
archive_options_listing_shell(archive_options_listing_shell && ref) noexcept = default;
archive_options_listing_shell & operator = (const archive_options_listing_shell & ref) = default;
archive_options_listing_shell & operator = (archive_options_listing_shell && ref) noexcept = default;
~archive_options_listing_shell() = default;
virtual void clear() override;
enum listformat
{
normal,
tree,
xml,
slicing
};
// setting methods
void set_list_mode(listformat list_mode) { x_list_mode = list_mode; set_slicing_location(list_mode == slicing); };
void set_sizes_in_bytes(bool arg) { x_sizes_in_bytes = arg; };
// getting methods
listformat get_list_mode() const { return x_list_mode; };
bool get_sizes_in_bytes() const { return x_sizes_in_bytes; };
private:
listformat x_list_mode;
bool x_sizes_in_bytes;
};
} // end of namespace
#endif
archive_options.hpp
this file contains a set of classes used to transmit options to archive operation
libdar::archive_options_listing_shell
class holding optional shell specific parameters used to list the contents of an existing archive
Definition archive_options_listing_shell.hpp:48
libdar::archive_options_listing_shell::listformat
listformat
defines the way archive listing is done:
Definition archive_options_listing_shell.hpp:62
libdar::archive_options_listing_shell::normal
@ normal
the tar-like listing (this is the default)
Definition archive_options_listing_shell.hpp:63
libdar::archive_options_listing_shell::tree
@ tree
the original dar's tree listing (for those that like forest)
Definition archive_options_listing_shell.hpp:64
libdar::archive_options_listing_shell::slicing
@ slicing
the slicing output (give info about where files are located)
Definition archive_options_listing_shell.hpp:66
libdar::archive_options_listing_shell::xml
@ xml
the xml catalogue output
Definition archive_options_listing_shell.hpp:65
libdar::archive_options_listing
class holding optional parameters used to list the contents of an existing archive
Definition archive_options.hpp:1447
libdar::archive_options_listing::set_slicing_location
void set_slicing_location(bool val)
whether to calculate the slice location of each file
Definition archive_options.hpp:1479
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47