Create a guard that manages the specified descriptor.
Synopsis
Declared in <bdls_filedescriptorguard.h>
explicit
FileDescriptorGuard(FilesystemUtil::FileDescriptor descriptor);
Description
Create a guard object that will manage the specified descriptor, closing it upon destruction (unless either release or closeAndRelease has been called). It is permissible for descriptor to be FilesystemUtil::k_INVALID_FD, in which case the guard created will not manage anything.
Parameters
Name |
Description |
descriptor |
file descriptor to manage; may be |
Created with MrDocs