From e8bbea1fc6e94e14768509d322f6c624403ffb36 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 22 Aug 2021 09:06:15 +1000 Subject: formats, osd, util: Started refactoring file I/O stuff. (#8456) Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives. --- src/lib/util/zippath.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/util/zippath.h') diff --git a/src/lib/util/zippath.h b/src/lib/util/zippath.h index 1eb92aa1c1d..955c75cfc8f 100644 --- a/src/lib/util/zippath.h +++ b/src/lib/util/zippath.h @@ -18,6 +18,7 @@ #include #include +#include namespace util { @@ -32,7 +33,7 @@ public: typedef std::unique_ptr ptr; // opens a directory - static osd_file::error open(std::string_view path, ptr &directory); + static std::error_condition open(std::string_view path, ptr &directory); // closes a directory virtual ~zippath_directory(); @@ -63,7 +64,7 @@ std::string zippath_combine(const std::string &path1, const std::string &path2); // ----- file operations ----- // opens a zip path file -osd_file::error zippath_fopen(std::string_view filename, uint32_t openflags, util::core_file::ptr &file, std::string &revised_path); +std::error_condition zippath_fopen(std::string_view filename, uint32_t openflags, util::core_file::ptr &file, std::string &revised_path); } // namespace util -- cgit v1.2.3-70-g09d2