summaryrefslogtreecommitdiffhomepage
path: root/ArchiveEx/Archive.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-08-20 22:41:02 +0200
committerAki <please@ignore.pl>2022-08-20 22:41:02 +0200
commite4bb06e7a22d766e7c0c689a9fa392346f5a3daa (patch)
tree8eee01e71a11816c9fc144057ff7731633f4704a /ArchiveEx/Archive.h
parentbc5e7b154c0160c7f512f9d0a1ad85de9b38edbe (diff)
downloadstarshatter-e4bb06e7a22d766e7c0c689a9fa392346f5a3daa.zip
starshatter-e4bb06e7a22d766e7c0c689a9fa392346f5a3daa.tar.gz
starshatter-e4bb06e7a22d766e7c0c689a9fa392346f5a3daa.tar.bz2
Merged on-demand Archive creation to constructor
Diffstat (limited to 'ArchiveEx/Archive.h')
-rw-r--r--ArchiveEx/Archive.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/ArchiveEx/Archive.h b/ArchiveEx/Archive.h
index 189cdbe..7ba32e4 100644
--- a/ArchiveEx/Archive.h
+++ b/ArchiveEx/Archive.h
@@ -24,12 +24,12 @@ struct Entry
class Archive
{
public:
- explicit Archive(const char* path);
+ explicit Archive(const char* path, bool create=false);
int Extract(int index, std::uint8_t*& buffer, bool null_terminated=false) const;
int Extract(const char* filepath, std::uint8_t*& buffer, bool null_terminated=false) const;
int Find(const char* filepath) const;
int Insert(const char* filepath);
- void WriteMeta();
+ void WriteMeta(bool create=false);
void GenerateBlockMap();
std::size_t FindFreeSpot(std::size_t bytes) const;
void PrintNamesOfEntries() const;
@@ -43,7 +43,4 @@ private:
};
-Archive CreateEmpty(const char* path);
-
-
} // namespace ArchiveEx