⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ozipfile.h

📁 这是一个兼容C++标准的IO流接口
💻 H
字号:
//------------------------------------------------------------------------------
// (c) 2001 Gottfried Chen
//------------------------------------------------------------------------------

#ifndef OZIPFILE_H
#define OZIPFILE_H

#include "zip.h"

namespace zip
{

class ozipfile
{
public:
    // Con/Destruction
    ozipfile(const char* fileName);
    // Ownership is reassigned on copying. I.e.: <rhs> will be invalid afterwards.
    ozipfile(ozipfile& rhs);
    ozipfile& operator=(ozipfile& rhs);
    ~ozipfile();

    // Close the .zip file.
    bool close();
    // Returns true if the .zip is open and ok.
    bool isOk() const;

    // Open/Close a file in the .zip. Only one file can be open at
    // a time.
    bool openInZip(const char* fileName);
    bool closeInZip();
    
    // Returns false if an error occured.
    bool write(void* buffer, unsigned int size);

private:
    zipFile mHandle;
    bool mFileInZipIsOpen;
};

} // namespace zip

#endif OZIPFILE_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -