Dokumentation
Tar Class Reference
Parser for the basic Tape ARchive Format (TAR). More...
#include <utils/tar.h>
Classes | |
struct | File |
File Entry. More... | |
Public Types | |
enum | Type : char { TYPE_REG_OLD = '\0' , TYPE_REG = '0' , TYPE_HARD_LINK = '1' , TYPE_SYM_LINK = '2' , TYPE_CHR = '3' , TYPE_BLK = '4' , TYPE_DIR = '5' , TYPE_FIFO = '6' , TYPE_CONTIG = '7' } |
Public Member Functions | |
assert_size (File, BLOCK_SIZE) | |
Tar (void *data) | |
Constructor. More... | |
bool | isValid (void *endptr) |
Valid values in file? More... | |
File * | get (unsigned entry) |
Get the entry for the n-th file. More... | |
unsigned | count () |
Number of entries in the archive. More... | |
Detailed Description
Parser for the basic Tape ARchive Format (TAR).
Member Enumeration Documentation
enum Tar::Type : char |
Constructor & Destructor Documentation
|
inlineexplicit |
Constructor.
- Parameters
-
data Buffer with the (full) contents of the TAR file
Member Function Documentation
bool Tar::isValid | ( | void * | endptr | ) |
Valid values in file?
- Parameters
-
endptr Pointer to the end of the buffer with the contents of the TAR file
- Returns
- 'true' if all values in file seem sane
Tar::File * Tar::get | ( | unsigned | entry | ) |
Get the entry for the n-th file.
- Parameters
-
entry Index of the file entry
- Returns
- Pointer to next file entry or 'nullptr' if it doesn't exist
unsigned Tar::count | ( | ) |
Number of entries in the archive.
- Returns
- Number of file entries
The documentation for this class was generated from the following files:
- utils/tar.h
- utils/tar.cc