sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::Tar Class Reference

#include <Tar.h>

Public Member Functions

 Tar ()=default
 
 Tar (const Buffer &tarData)
 
 Tar (const String &tarFileName)
 
void read (const String &fileName)
 
void read (const char *fileName)
 
void read (const Buffer &tarData)
 
Strings fileList () const
 
const ArchiveFilefile (const String &fileName) const
 
void remove (const String &filename)
 
void append (const SArchiveFile &file)
 
void save (const String &tarFileName) const
 
void clear ()
 

Detailed Description

Tar archive

Allows reading tar archive files into memory buffers. The main usage currently is to read an SPTK theme from tar-archive.

Constructor & Destructor Documentation

◆ Tar() [1/3]

sptk::Tar::Tar ( )
default

Constructor

◆ Tar() [2/3]

sptk::Tar::Tar ( const Buffer tarData)
explicit

Constructor

Parameters
tarDataTar archive data

◆ Tar() [3/3]

sptk::Tar::Tar ( const String tarFileName)
explicit

Constructor

Parameters
tarDataTar file name

Member Function Documentation

◆ append()

void sptk::Tar::append ( const SArchiveFile &  file)

Add file data

Parameters
fileNameArchive file

◆ clear()

void sptk::Tar::clear ( )

Clears the allocated memory

◆ file()

const ArchiveFile & sptk::Tar::file ( const String fileName) const

Return file data by file name

Parameters
fileNameFile name
Returns
file data

◆ fileList()

Strings sptk::Tar::fileList ( ) const
inline

returns a list of files in tar archive

References sptk::Strings::push_back().

◆ read() [1/3]

void sptk::Tar::read ( const Buffer tarData)

Reads tar archive from buffer

The archive content is red into the internal set of buffers

Parameters
tarDataTar file buffer

◆ read() [2/3]

void sptk::Tar::read ( const char *  fileName)

Reads tar archive from file

The archive content is red into the internal set of buffers

Parameters
fileNameFile name to open

◆ read() [3/3]

void sptk::Tar::read ( const String fileName)
inline

Reads tar archive from file

The archive content is red into the internal set of buffers

Parameters
fileNameFile name to open

◆ remove()

void sptk::Tar::remove ( const String filename)

Remove file data

Parameters
fileNameArchive file

◆ save()

void sptk::Tar::save ( const String tarFileName) const

Save tar archive to file

Parameters
tarFileNameTar file name

The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:46: SPTK 5.4.1