SYNOPSIS

mongoc_gridfs_file_t *
mongoc_gridfs_file_list_next (mongoc_gridfs_file_list_t *list);

DESCRIPTION

The mongoc_gridfs_file_list_next() function shall iterate the underlying gridfs file list, returning the next file each iteration.

mongoc_gridfs_file_list_next() is a blocking function.

RETURN VALUE

The mongoc_gridfs_file_list_next() function returns a mongoc_gridfs_file(7) if one is available, or NULL if there are no more files to return or in the presence of an error.

ERRORS

Errors in the read can be determined with the mongoc_gridfs_file_list_error(3) function.

LIFECYCLE

The bson objects set in mongoc_gridfs_file_list_next(3) are not ephemeral and are independent of the list. This means that you do not need to copy the returned bson if you wish to retain it beyond the lifetime of a single call to mongoc_gridfs_file_list_next().

This behavior departs from the contract in mongoc_cursor_next(3).

SEE ALSO

AUTHORS

This page was written by MongoDB Inc.