Filer
Public Member Functions | List of all members
SqshArchiveReader Class Reference

The SqshArchiveReader class provides functionality to read files from a SquashFS archive. More...

#include <SqshArchiveReader.h>

Inheritance diagram for SqshArchiveReader:
Inheritance graph
[legend]
Collaboration diagram for SqshArchiveReader:
Collaboration graph
[legend]

Public Member Functions

 SqshArchiveReader (uint64_t archive_offset=0, QObject *parent=nullptr)
 Constructs a SqshArchiveReader object with the specified archive offset. More...
 
QStringList readSqshArchive (const QString &sqsh_file)
 Reads and returns the list of files present in the SquashFS archive. More...
 
QByteArray readFileFromArchive (const QString &sqsh_file, const QString &file_path)
 Reads the contents of a specific file from the SquashFS archive. More...
 

Detailed Description

The SqshArchiveReader class provides functionality to read files from a SquashFS archive.

The class allows reading the contents of a SquashFS archive and individual files from it. It provides methods to list all the files in the archive and read the contents of specific files.

Constructor & Destructor Documentation

◆ SqshArchiveReader()

SqshArchiveReader::SqshArchiveReader ( uint64_t  archive_offset = 0,
QObject *  parent = nullptr 
)
explicit

Constructs a SqshArchiveReader object with the specified archive offset.

Parameters
archive_offsetThe offset at which the SquashFS archive starts in the source file (default is 0).
parentThe parent QObject (default is nullptr).

Member Function Documentation

◆ readFileFromArchive()

QByteArray SqshArchiveReader::readFileFromArchive ( const QString &  sqsh_file,
const QString &  file_path 
)

Reads the contents of a specific file from the SquashFS archive.

Parameters
sqsh_fileThe path to the SquashFS archive file.
file_pathThe path of the file to read from the archive.
Returns
QByteArray containing the data of the requested file.

◆ readSqshArchive()

QStringList SqshArchiveReader::readSqshArchive ( const QString &  sqsh_file)

Reads and returns the list of files present in the SquashFS archive.

Parameters
sqsh_fileThe path to the SquashFS archive file.
Returns
QStringList containing the names of all the files in the archive.

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