Skip to content

Commit

Permalink
Create archive file from files.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart6854 committed Nov 25, 2023
1 parent bbf6956 commit 8708e2d
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 117 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ bin/
obj/

# Uneeded Resources
*.rbin
*.rbin
*.rpak
8 changes: 6 additions & 2 deletions include/gfs/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ namespace gfs
// Files
//////////////////////////////////////////////////////////////////////////

/**
* POD type.
*/
struct File
{
FileID FileId; // The Unique Identifier of the file.
Expand All @@ -108,7 +111,7 @@ namespace gfs
* @param id
* @return
*/
auto GetFile(FileID id) -> const File*;
auto GetFile(FileID id) const -> const File*;

/**
* @brief
Expand Down Expand Up @@ -143,7 +146,7 @@ namespace gfs
// Archives
//////////////////////////////////////////////////////////////////////////

bool CreateArchive(MountID mount, const std::filesystem::path& filename, const std::vector<FileID>& files);
bool CreateArchive(MountID mountId, const std::filesystem::path& filename, const std::vector<FileID>& files);

//////////////////////////////////////////////////////////////////////////
// Import
Expand Down Expand Up @@ -187,6 +190,7 @@ namespace gfs

private:
auto GetMount(MountID id) -> Mount*;
auto GetFile(FileID id) -> File*;

auto GetMountPathIsIn(const std::filesystem::path& path) -> MountID;

Expand Down
Loading

0 comments on commit 8708e2d

Please sign in to comment.