The Pedigree Project
0.1
|
#include <Archive.h>
Classes | |
struct | ArchiveFile |
Public Member Functions | |
Archive (uint8_t *pPhys, size_t sSize) | |
~Archive () | |
size_t | getNumFiles () |
size_t | getFileSize (size_t n) |
char * | getFileName (size_t n) |
uintptr_t * | getFile (size_t n) |
Private Member Functions | |
ArchiveFile * | getFirst () |
ArchiveFile * | getNext (ArchiveFile *pFile) |
ArchiveFile * | get (size_t n) |
Private Attributes | |
MemoryRegion | m_Region |
This class provides functions for extracting an archive file as made by UNIX Tar.
Archive::Archive | ( | uint8_t * | pPhys, |
size_t | sSize | ||
) |
Constructor; takes the physical address of a Tar archive.
Definition at line 28 of file Archive.cc.
References PhysicalMemoryManager::continuous, ERROR, PhysicalMemoryManager::getPageSize(), PhysicalMemoryManager::instance(), VirtualAddressSpace::KernelMode, and panic().
Archive::~Archive | ( | ) |
Destructor; returns the physical memory used during construction to the physical memory pool.
Definition at line 53 of file Archive.cc.
uintptr_t * Archive::getFile | ( | size_t | n | ) |
Returns a pointer to the first byte of the n'th file.
n | The file to retrieve. |
Definition at line 84 of file Archive.cc.
References MemoryRegion::virtualAddress().
char * Archive::getFileName | ( | size_t | n | ) |
Returns the name of the n'th file in the archive, in bytes.
n | The file to retrieve. |
Definition at line 79 of file Archive.cc.
size_t Archive::getFileSize | ( | size_t | n | ) |
Returns the size of the n'th file in the archive, in bytes.
n | The file to retrieve. |
Definition at line 72 of file Archive.cc.
size_t Archive::getNumFiles | ( | ) |
Returns the number of files in the archive.
Definition at line 60 of file Archive.cc.