SYNOPSIS

mongoc_gridfs_file_list_t *list;
mongoc_gridfs_file_t *file;

list = mongoc_gridfs_find (gridfs, query);

while ((file = mongoc_gridfs_file_list_next (list))) {
   do_something(file);

   mongoc_gridfs_file_destroy (file);
}

mongoc_gridfs_file_list_destroy (list);

DESCRIPTION

mongoc_gridfs_file_list provides a gridfs file list abstraction. It provides iteration and basic marshalling on top of a regular mongoc_collection_find(3) style query. In interface, it’s styled after mongoc_cursor(7).

THREAD SAFETY

mongoc_gridfs_file_list is NOT thread-safe and should only be used from one thread at a time.

LIFECYCLE

The mongoc_gridfs_file(7)s produced by the list are independent and can be freed and stored separately from the list iteration.

EXAMPLE

For an example, see mongoc_gridfs(7)

SEE ALSO

AUTHORS

This page was written by MongoDB Inc.