|
#include <CTar.h>
Public Member Functions | |
| CTar () | |
| Constructor. | |
| ~CTar () | |
| Destructor. | |
| void | read (const std::string &fileName) throw (CException) |
| Reads tar archive from file. | |
| void | read (const char *fileName) throw (CException) |
| Reads tar archive from file. | |
| void | read (const CBuffer &tarData) throw (CException) |
| Reads tar archive from buffer. | |
| const CStrings & | fileList () const |
| returns a list of files in tar archive | |
| const CBuffer & | file (std::string fileName) const throw (CException) |
| Returns file data by file name. | |
| void | clear () |
| Clears the allocated memory. | |
Static Public Member Functions | |
| static CMemoryTarHandle * | tarMemoryHandle (int handle) |
| Returns memory handle. | |
| static int | mem_open (const char *name, int x,...) |
| Overwrites standard tar open. | |
| static int | mem_close (int handle) |
| Overwrites standard tar close. | |
| static int | mem_read (int handle, void *buf, size_t len) |
| Overwrites standard tar read. | |
| static int | mem_write (int handle, const void *buf, size_t len) |
| Overwrites standard tar write. | |
Static Public Attributes | |
| static int | lastTarHandle |
| The last generated tar handle. | |
| static CTarHandleMap * | tarHandleMap |
| The map of tar handles. | |
Allows reading tar archive files into memory buffers. The main usage currently is to read an SPTK theme from tar-archive.
| const CBuffer& sptk::CTar::file | ( | std::string | fileName | ) | const throw (CException) |
Returns file data by file name.
| fileName | std::string, file name |
| static int sptk::CTar::mem_close | ( | int | handle | ) | [static] |
Overwrites standard tar close.
| handle | int, tar handle |
| static int sptk::CTar::mem_read | ( | int | handle, | |
| void * | buf, | |||
| size_t | len | |||
| ) | [static] |
Overwrites standard tar read.
| handle | int, tar handle | |
| buf | void*, data buffer | |
| len | size_t, read size |
| static int sptk::CTar::mem_write | ( | int | handle, | |
| const void * | buf, | |||
| size_t | len | |||
| ) | [static] |
Overwrites standard tar write.
| handle | int, tar handle | |
| buf | void*, data buffer | |
| len | size_t, write size |
| void sptk::CTar::read | ( | const CBuffer & | tarData | ) | throw (CException) |
Reads tar archive from buffer.
The archive content is red into the internal set of buffers
| tarData | const CBuffer&, tar file buffer |
| void sptk::CTar::read | ( | const char * | fileName | ) | throw (CException) |
Reads tar archive from file.
The archive content is red into the internal set of buffers
| fileName | std::string, file name to open |
| void sptk::CTar::read | ( | const std::string & | fileName | ) | throw (CException) [inline] |
Reads tar archive from file.
The archive content is red into the internal set of buffers
| fileName | std::string, file name to open |
| static CMemoryTarHandle* sptk::CTar::tarMemoryHandle | ( | int | handle | ) | [static] |
Returns memory handle.
| handle | int, tar handle |