From 1f7066186a040243fc3b4132f7b19af5d894bc5a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 16 May 2021 01:14:29 +0300 Subject: File: make public child of Handle --- include/winapi/file.hpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'include/winapi') diff --git a/include/winapi/file.hpp b/include/winapi/file.hpp index 78187d9..e9f8510 100644 --- a/include/winapi/file.hpp +++ b/include/winapi/file.hpp @@ -21,7 +21,7 @@ namespace winapi { bool operator==(const FILE_ID_128& a, const FILE_ID_128& b); -class File : private Handle { +class File : public Handle { public: struct ID { const FILE_ID_INFO impl; @@ -32,23 +32,18 @@ public: } }; - static Handle open_r(const std::string&); - static Handle open_r(const CanonicalPath&); - static Handle open_read_attributes(const std::string&); - static Handle open_read_attributes(const CanonicalPath&); - static Handle open_w(const std::string&); - static Handle open_w(const CanonicalPath&); + static File open_r(const std::string&); + static File open_r(const CanonicalPath&); + static File open_read_attributes(const std::string&); + static File open_read_attributes(const CanonicalPath&); + static File open_w(const std::string&); + static File open_w(const CanonicalPath&); static void remove(const std::string&); static void remove(const CanonicalPath&); explicit File(Handle&& handle) : Handle(std::move(handle)) {} - using Handle::close; - - using Handle::read; - using Handle::write; - std::size_t get_size() const; ID query_id() const; -- cgit v1.2.3