mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-09-13 04:55:18 -05:00
Update ZIP logic to include and detect directory entries. Fixes 289.
This commit is contained in:
@@ -41,6 +41,9 @@ namespace fs
|
||||
/// @brief Reads from the currently open file to the buffer passed.
|
||||
ssize_t read(void *buffer, size_t bufferSize);
|
||||
|
||||
/// @brief Returns if the entry is just a directory.
|
||||
bool is_directory() const noexcept;
|
||||
|
||||
/// @brief Returns the name of the current file.
|
||||
const char *get_filename() const noexcept;
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace fs
|
||||
/// @brief Manual call for closing the zipFile.
|
||||
void close();
|
||||
|
||||
/// @brief Creates a new dummy directory entry in the ZIP.
|
||||
/// @param Path Path of the directory. Will be appended with a trailing slash if needed.
|
||||
void add_directory(std::string_view path);
|
||||
|
||||
/// @brief Opens a new file with filename as the path.
|
||||
bool open_new_file(std::string_view filename, bool trimPath = false, size_t trimPlaces = 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user