Create unzipper for file
Class Unzip
#include <Geode/utils/file.hpp>
classUnzip{ ... }
No description provided
Examples0
Public static methods4
staticgeode::Result<geode::utils::file::Unzip>create()
staticgeode::Result<geode::utils::file::Unzip>create()
Create unzipper for data in-memory
staticgeode::Result<>intoDir(,,booldeleteZipAfter)
Helper method for quickly unzipping a file
from
ZIP file to unzip
to
Directory to unzip to
deleteZipAfter
Whether to delete the zip after unzipping
Succesful result on success, errorful result on error
staticgeode::Result<>intoDir(,,,booldeleteZipAfter)
No description provided
Public member functions7
voidsetProgressCallback()
Set a callback to be called with the progress of the unzip operation, first argument is the current entry, second argument is the total entries
callback
Callback to call with the progress of the unzip operation
ℹ This is not thread-safe
geode::utils::file::Unzip::PathgetPath()const
Path to the opened zip
The path to the zip that is being read, or an empty path if the zip was opened in memory
std::vector<geode::utils::file::Unzip::Path>getEntries()const
Get all entries in zip
boolhasEntry()
Check if zip has entry
name
Entry path in zip
geode::Result<geode::ByteVector>extract()
Extract entry to memory
name
Entry path in zip
geode::Result<>extractTo(,)
Extract entry to file
name
Entry path in zip
path
Target file path
geode::Result<>extractAllTo()
Extract all entries to directory
dir
Directory to unzip the contents to