Chromium Embedded Framework (CEF)
131.2.1+ge081753+chromium-131.0.6778.13
|
Thread-safe class for accessing zip archive file contents. More...
#include "include/wrapper/cef_zip_archive.h"
Classes | |
class | File |
Class representing a file in the archive. More... | |
Public Types | |
using | FileMap = std::map< CefString, CefRefPtr< File > > |
Public Member Functions | |
CefZipArchive () | |
Create a new object. More... | |
CefZipArchive (const CefZipArchive &)=delete | |
CefZipArchive & | operator= (const CefZipArchive &)=delete |
size_t | Load (CefRefPtr< CefStreamReader > stream, const CefString &password, bool overwriteExisting) |
Load the contents of the specified zip archive stream into this object. More... | |
void | Clear () |
Clears the contents of this object. More... | |
size_t | GetFileCount () const |
Returns the number of files in the archive. More... | |
bool | HasFile (const CefString &fileName) const |
Returns true if the specified file exists and has contents. More... | |
CefRefPtr< File > | GetFile (const CefString &fileName) const |
Returns the specified file. More... | |
bool | RemoveFile (const CefString &fileName) |
Removes the specified file. More... | |
size_t | GetFiles (FileMap &map) const |
Returns the map of all files. More... | |
Public Member Functions inherited from base::RefCountedThreadSafe< CefZipArchive > | |
RefCountedThreadSafe () | |
RefCountedThreadSafe (const RefCountedThreadSafe &)=delete | |
RefCountedThreadSafe & | operator= (const RefCountedThreadSafe &)=delete |
void | AddRef () const |
void | Release () const |
Friends | |
class | base::RefCountedThreadSafe< CefZipArchive > |
Additional Inherited Members | |
Static Public Attributes inherited from base::RefCountedThreadSafe< CefZipArchive > | |
static constexpr cef_subtle::StartRefCountFromZeroTag | kRefCountPreference |
Protected Member Functions inherited from base::RefCountedThreadSafe< CefZipArchive > | |
~RefCountedThreadSafe ()=default | |
Thread-safe class for accessing zip archive file contents.
This class should not be used with large archive files because all data will be resident in memory at the same time. This implementation supports a restricted set of zip archive features:
using CefZipArchive::FileMap = std::map<CefString, CefRefPtr<File> > |
CefZipArchive::CefZipArchive | ( | ) |
Create a new object.
|
delete |
void CefZipArchive::Clear | ( | ) |
Clears the contents of this object.
Returns the specified file.
size_t CefZipArchive::GetFileCount | ( | ) | const |
Returns the number of files in the archive.
size_t CefZipArchive::GetFiles | ( | FileMap & | map | ) | const |
Returns the map of all files.
bool CefZipArchive::HasFile | ( | const CefString & | fileName | ) | const |
Returns true if the specified file exists and has contents.
size_t CefZipArchive::Load | ( | CefRefPtr< CefStreamReader > | stream, |
const CefString & | password, | ||
bool | overwriteExisting | ||
) |
Load the contents of the specified zip archive stream into this object.
If the zip archive requires a password then provide it via |password|. If |overwriteExisting| is true then any files in this object that also exist in the specified archive will be replaced with the new files. Returns the number of files successfully loaded.
|
delete |
bool CefZipArchive::RemoveFile | ( | const CefString & | fileName | ) |
Removes the specified file.
|
friend |