mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
feature(FileStream): Allow using Poco::FileStream to wrap arbitrary file handles/descriptors as C++ streams (#4424)
* Allow using Poco::FileStream to wrap arbitrary file handles/descriptors as C++ streams (#3444). * Allow opening a file descriptor/HANDLE as C++ stream. * FileStream: treat read from closed pipe as EOF. * chore(Filestream): conde style (naming) Co-Authored-By: Alex Fabijanic <alex@pocoproject.org> Co-Authored-By: Matej Kenda <matejken@gmail.com> * enh(FileStream): make FileIOS::open a virtual function. (#3444) * test(FileStream): unit test for FileStream::openHandle (#3444) * Update CONTRIBUTORS. * test(FileStream): Win32 unit test fix. * build(CMake): Require policy minimum version 3.15. --------- Co-authored-by: Daniel Grunwald <grunwald@axivion.com> Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
This commit is contained in:
@@ -42,6 +42,9 @@ public:
|
||||
void open(const std::string& path, std::ios::openmode mode);
|
||||
/// Opens the given file in the given mode.
|
||||
|
||||
void openHandle(NativeHandle fd, std::ios::openmode mode);
|
||||
/// Take ownership of the given file descriptor.
|
||||
|
||||
bool close();
|
||||
/// Closes the File stream buffer. Returns true if successful,
|
||||
/// false otherwise.
|
||||
|
||||
Reference in New Issue
Block a user