diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e416758..f34026af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Version 283: * ostream_buffer satisfies preconditions of DynamicBuffer_v1::commit +* Add accessor function to File member of basic_file_body Version 282: diff --git a/include/boost/beast/http/basic_file_body.hpp b/include/boost/beast/http/basic_file_body.hpp index 9d42c9cc..01eae3c1 100644 --- a/include/boost/beast/http/basic_file_body.hpp +++ b/include/boost/beast/http/basic_file_body.hpp @@ -111,6 +111,12 @@ public: /// Move assignment value_type& operator=(value_type&& other) = default; + /// Return the file + File& file() + { + return file_; + } + /// Returns `true` if the file is open bool is_open() const diff --git a/include/boost/beast/http/impl/file_body_win32.hpp b/include/boost/beast/http/impl/file_body_win32.hpp index e42be7f0..a2cc661f 100644 --- a/include/boost/beast/http/impl/file_body_win32.hpp +++ b/include/boost/beast/http/impl/file_body_win32.hpp @@ -78,6 +78,11 @@ struct basic_file_body value_type(value_type&& other) = default; value_type& operator=(value_type&& other) = default; + file_win32& file() + { + return file_; + } + bool is_open() const {