SYNOPSIS
mongoc_stream_t *mongoc_stream_file_new (int fd); mongoc_stream_t *mongoc_stream_file_new_for_path (const char *path, int flags, int mode);
DESCRIPTION
The mongoc_stream_file_new() function shall create a new mongoc_stream(7), taking ownership of the file-descriptor fd.
- fd
-
The file descriptor to take ownership of. fd will be closed when the stream is disposed.
The mongoc_stream_file_new_for_path() function shall create a new mongoc_stream(7), using the path, flags and mode provided. This calls open() and the semantics are the same.
RETURN VALUE
The mongoc_stream_file_new() and mongoc_stream_file_new_for_path() functions return a new mongoc_stream(7).
If there was a failure to open the file, NULL is returned and errno is set.
ERRORS
errno is set if NULL is returned.
SEE ALSO
AUTHORS
This page was written by MongoDB, Inc.