Skip to content

ArchangelSDY/QtRAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtRAR Build status

A Qt wrapper of UnRAR library.

Disclaimer: I use this in several projects but it hasn't been tested in any serious production environment.

Usage

// Open a RAR archive
QtRAR archive("/path/to/archive");
if (!archive.open(QtRAR::OpenModeExtract)) {
    return;
}

// List file names
QStringList fileNames = archive.fileNameList();

// List file infos
QList<QtRARFileInfo> fileInfos = archive.fileInfoList();

// Extract one file
// QtRARFile derives from QIODevice
QtRARFile file(archive);
file.setFileName("foo/bar.txt");
if (file.open(QIODevice::ReadOnly)) {
    QByteArray content = file.readAll();
}

// QtRARFile can also be created directly
// An implicit QtRAR object will be created
QtRARFile file2("/path/to/archive", "foo/bar.txt");

License

MIT

About

Qt wrapper of UnRAR library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages