Associate this object with the specified fileDescriptor, and record the state of the specified writableFlag which, if true, indicates that the fileDescriptor is writable, otherwise it is not. Before making this association, if, prior to this call, willCloseOnReset is true, close any file descriptor previously associated with this object, otherwise leave it open but disassociate this object from it. The optionally specified willCloseOnResetFlag will set willCloseOnReset, which, if true, indicates that fileDescriptor is to be closed when this object is cleared, reset, or destroyed, otherwise no action will be taken on fileDescriptor at that time. Optionally specify a binaryModeFlag, which is ignored on Unix; if false on Windows, it indicates that `
`s internally are to be translated to and from `\r
` sequences on the device; on Unix or if binaryModeFlag is true no such translation is to occur. Return 0 on success, and a non‐zero value otherwise. Note that if FilesystemUtil::k_INVALID_FD is passed as fileDescriptor, no file descriptor is to be associated with this object. Also note that the state of fileDescriptor is unchanged by this call, there is no implicit seek.
Synopsis
Declared in <bdls_fdstreambuf.h>
int
reset(
FilesystemUtil::FileDescriptor fileDescriptor,
bool writableFlag,
bool willCloseOnResetFlag = true,
bool binaryModeFlag = false);
Created with MrDocs