
#include "us_tar.h"

Classes | |
| struct | posix_header |
Public Member Functions | |
| US_Tar () | |
| int | create (const QString &, const QString &, QStringList *=0) |
| int | create (const QString &, const QStringList &, QStringList *=0) |
| int | extract (const QString &, QStringList *=0) |
| int | list (const QString &, QStringList &) |
| QString | explain (const int) |
Private Types | |
| typedef struct US_Tar::posix_header | posix_header |
Private Member Functions | |
| void | process_dir (const QString &, QStringList &) |
| void | write_file (const QString &) |
| void | write_long_filename (const QString &) |
| void | flush_buffer (void) |
| void | archive_end (void) |
| bool | validate_header (void) |
| void | read_block (void) |
| QString | get_long_filename (void) |
| QString | format_permissions (const unsigned int, const bool) |
| QString | format_datetime (const unsigned int) |
Private Attributes | |
| int | ofd |
| int | ifd |
| union { | |
| posix_header header | |
| unsigned char h [BLOCK_SIZE] | |
| } | tar_header |
| unsigned char | buffer [BLOCK_SIZE *BLOCKING_FACTOR] |
| int | blocks_written |
| int | blocks_read |
| int | archive_size |
A class to provide tar functions internally to a routine. The functions provided are create, extract, and list.
|
private |
| US_Tar::US_Tar | ( | ) |
Definition at line 51 of file us_tar.cpp.
|
private |
Definition at line 444 of file us_tar.cpp.
| int US_Tar::create | ( | const QString & | archive, |
| const QString & | directory, | ||
| QStringList * | list = 0 |
||
| ) |
Create a tar file from a directory
| archive | The name of the tar file to be created. |
| directory | The name of the directory to archive. |
| list | The optional output list of archived files. |
Definition at line 55 of file us_tar.cpp.
| int US_Tar::create | ( | const QString & | archive, |
| const QStringList & | files, | ||
| QStringList * | list = 0 |
||
| ) |
Create a tar file from a list of files (including directories)
| archive | The name of the tar file to be created. |
| files | A list of names of files/directories to archive. |
| list | The optional output list of archived files. |
Definition at line 64 of file us_tar.cpp.
| QString US_Tar::explain | ( | const int | error | ) |
Explain in a message string the tar function error that occurred.
| error | The error code to be explained. |
Definition at line 896 of file us_tar.cpp.
| int US_Tar::extract | ( | const QString & | archive, |
| QStringList * | list = 0 |
||
| ) |
Extract from a tar file the files archived.
| archive | The name of the tar file from which to extract. |
| list | The optional output list of extracted files. |
Definition at line 480 of file us_tar.cpp.
|
private |
Definition at line 461 of file us_tar.cpp.
|
private |
Definition at line 811 of file us_tar.cpp.
|
private |
Definition at line 794 of file us_tar.cpp.
|
private |
Definition at line 867 of file us_tar.cpp.
| int US_Tar::list | ( | const QString & | archive, |
| QStringList & | files | ||
| ) |
List the files archived in a tar file.
| archive | The name of the tar file whose content is to be listed. |
| files | The output list of archived files. |
Definition at line 694 of file us_tar.cpp.
|
private |
Definition at line 150 of file us_tar.cpp.
|
private |
Definition at line 889 of file us_tar.cpp.
|
private |
Definition at line 823 of file us_tar.cpp.
|
private |
Definition at line 193 of file us_tar.cpp.
|
private |
Definition at line 333 of file us_tar.cpp.
|
private |
| unsigned char US_Tar::h[BLOCK_SIZE] |
| posix_header US_Tar::header |
| union { ... } US_Tar::tar_header |
1.8.3.1-20130324