File-Based Devices

Overview
Headers
Reference
Acknowledgments

Overview

The Iostreams library provides three families of Devices for file access. The class templates file_source, file_sink and file are wrappers for std::basic_filebuf which are CopyConstructible and Assignable. The class templates mapped_file_source, mapped_file_sink and mapped_file provide access to memory-mapped files on Windows an POSIX. The class templates file_descriptor_source, file_descriptor_sink and file_descriptor implement Devices based on native operating system file descriptors.

Headers

<boost/iostreams/device/file.hpp>
<boost/iostreams/device/mapped_file.hpp>
<boost/iostreams/device/file_descriptor.hpp>

Reference

File Wrappers
Memory-Mapped File Devices
File Descriptor Devices

Acknowledgments

The memory-mapped file Devices are based on work of Craig Henderson ([Henderson]). The file descriptor Devices are based on work of Nicolai Josuttis ([Josuttis1] pp. 672-3 and [Josuttis2]).