| Line 50... |
Line 50... |
| 50 |
bool readFiles ();
|
50 |
bool readFiles ();
|
| 51 |
void LoadDatFile ();
|
51 |
void LoadDatFile ();
|
| 52 |
|
52 |
|
| 53 |
bool checkExtensionPck(const Utils::String &filename) const;
|
53 |
bool checkExtensionPck(const Utils::String &filename) const;
|
| 54 |
|
54 |
|
| 55 |
unsigned char *readData ( CyString filename, size_t *size );
|
55 |
unsigned char *readData(const Utils::String &filename, size_t *size);
|
| 56 |
unsigned char *readData ( SInCatFile *c, size_t *size );
|
56 |
unsigned char *readData(SInCatFile *c, size_t *size);
|
| 57 |
SInCatFile *FindData(CyString filename);
|
- |
|
| 58 |
SInCatFile *findData(const Utils::String &filename) const;
|
57 |
SInCatFile *findData(const Utils::String &filename) const;
|
| 59 |
bool ReadFileToData ( CyString filename );
|
58 |
bool readFileToData(const Utils::String &filename);
|
| 60 |
bool ReadFileToData ( SInCatFile *c );
|
59 |
bool readFileToData(SInCatFile *c);
|
| 61 |
|
60 |
|
| 62 |
bool MarkRemoveFile ( SInCatFile *f );
|
61 |
bool markRemoveFile(SInCatFile *f);
|
| 63 |
bool MarkRemoveFile ( CyString filename );
|
62 |
bool markRemoveFile(const Utils::String &filename);
|
| 64 |
|
63 |
|
| 65 |
int GetEndOffset();
|
64 |
int GetEndOffset();
|
| 66 |
size_t GetNumFiles() const;
|
65 |
size_t GetNumFiles() const;
|
| 67 |
SInCatFile *GetFile(unsigned int num) const;
|
66 |
SInCatFile *GetFile(unsigned int num) const;
|
| 68 |
|
67 |
|
| Line 70... |
Line 69... |
| 70 |
|
69 |
|
| 71 |
static bool Opened(int error, bool allowCreate = true);
|
70 |
static bool Opened(int error, bool allowCreate = true);
|
| 72 |
bool removeFile(SInCatFile *f);
|
71 |
bool removeFile(SInCatFile *f);
|
| 73 |
bool removeFile(const Utils::String &filename);
|
72 |
bool removeFile(const Utils::String &filename);
|
| 74 |
bool WriteCatFile ();
|
73 |
bool WriteCatFile ();
|
| 75 |
bool AppendFile(const Utils::String &sFilename, const Utils::String &to, bool pck = true, bool bXor = true, Utils::String *sChangeTo = NULL);
|
74 |
bool appendFile(const Utils::String &sFilename, const Utils::String &to, bool pck = true, bool bXor = true, Utils::String *sChangeTo = NULL);
|
| 76 |
bool AppendData ( unsigned char *data, size_t size, CyString to, bool pck = true, bool bXor = true );
|
75 |
bool appendData (unsigned char *data, size_t size, const Utils::String &to, bool pck = true, bool bXor = true );
|
| 77 |
bool AddData ( CyString catfile, unsigned char *data, size_t size, CyString to, bool pck = true, bool create = true );
|
76 |
bool addData(const Utils::String &catfile, unsigned char *data, size_t size, const Utils::String &to, bool pck = true, bool create = true );
|
| 78 |
|
77 |
|
| 79 |
CyString ChangeExtension ( CyString f );
|
- |
|
| 80 |
std::vector<SInCatFile *> *GetFiles() const;
|
78 |
std::vector<SInCatFile *> *GetFiles() const;
|
| 81 |
|
79 |
|
| 82 |
bool ExtractFile ( CyString filename, CyString to = NullString, bool preserve = false );
|
80 |
bool extractFile(const Utils::String &filename, const Utils::String &to = Utils::String::Null(), bool preserve = false);
|
| 83 |
bool ExtractFile ( SInCatFile *f, CyString to = NullString, bool preserve = false );
|
81 |
bool extractFile(SInCatFile* f, const Utils::String &to = Utils::String::Null(), bool preserve = false);
|
| 84 |
bool ExtractAll (CyString dir);
|
82 |
bool extractAll(const Utils::String &dir);
|
| 85 |
|
83 |
|
| 86 |
void clearError () { m_iError = CATERR_NONE; _sError.clear(); }
|
84 |
void clearError () { m_iError = CATERR_NONE; _sError.clear(); }
|
| 87 |
int error () const { return m_iError; }
|
85 |
int error () const { return m_iError; }
|
| 88 |
const Utils::String &errorString() const { return _sError; }
|
86 |
const Utils::String &errorString() const { return _sError; }
|
| 89 |
Utils::String getErrorString () const;
|
87 |
Utils::String getErrorString () const;
|
| 90 |
|
88 |
|
| 91 |
const Utils::String &internalDatFilename() const;
|
89 |
const Utils::String &internalDatFilename() const;
|
| 92 |
const Utils::String &catFilename() const { return m_fCatFile.fullFilename(); }
|
90 |
const Utils::String &catFilename() const { return m_fCatFile.fullFilename(); }
|
| 93 |
const Utils::String &datFilename() const { return m_fDatFile.fullFilename(); }
|
91 |
const Utils::String &datFilename() const { return m_fDatFile.fullFilename(); }
|
| 94 |
|
92 |
|
| 95 |
bool WriteFromCat ( CyString catfile, CyString file );
|
93 |
bool writeFromCat(const Utils::String &catfile, const Utils::String &file);
|
| 96 |
bool WriteFromCat ( CCatFile *fcat, CyString file );
|
94 |
bool writeFromCat(CCatFile* fcat, const Utils::String &file);
|
| 97 |
|
- |
|
| 98 |
void FindFiles(CyStringList *list, CyString filemask);
|
- |
|
| 99 |
|
95 |
|
| - |
|
96 |
void findFiles(Utils::CStringList &list, const Utils::String &filemask) const;
|
| 100 |
|
97 |
|
| 101 |
private:
|
98 |
private:
|
| 102 |
void _clearFiles();
|
99 |
void _clearFiles();
|
| 103 |
int _checkFiletype(const unsigned char *pBuffer, int iSize);
|
100 |
int _checkFiletype(const unsigned char *pBuffer, int iSize);
|
| 104 |
void RemoveData ();
|
101 |
void RemoveData ();
|