Private helper that isolates file operations from FdStreamBuf.
Synopsis
Declared in <bdls_fdstreambuf.h>
class FdStreamBuf_FileHandler;
Description
This private helper class isolates direct operations on files from the FdStreamBuf class; it is a thin wrapper around FilesystemUtil. One service this class provides is converting between an in‐process ` ` and its corresponding on‐file `\r ` when writing to or reading from a Windows text file. On reset an object of this type is associated with a supplied file descriptor, after which it can do simple operations on that file descriptor in the service of a FdStreamBuf.
Member Functions
Name |
Description |
|
Create a file handler that is not associated with any file descriptor. Note that |
|
Destroy this file handler. If |
Release any file descriptor associated with this file handler. |
|
Return the file descriptor associated with this object, if |
|
Return the size of the file associated with this file handler, or 0 if it is associated with a device other than a regular file (e.g., a device or directory). |
|
Return the on‐disk size of the byte range |
|
Return |
|
Return |
|
Return whether this handler's file descriptor refers to a regular file. |
|
Map a file section into read‐only memory. |
|
Return the |
|
Read |
|
Disassociate this file handler from its file descriptor without closing it. |
|
Associate this object with the specified file descriptor. |
|
Set the file position associated with this object according to the specified |
|
Set whether this handler closes its file descriptor on reset. |
|
Unmap the memory range starting at |
|
Return whether the associated file descriptor will be closed on reset. |
|
Write |