mongo.gridfile.destroy: Destroy a mongo.gridfile object

Description Usage Arguments Details See Also Examples

View source: R/gridfs.R

Description

Releases the resources associated with a mongo.gridfile object.
These are created by mongo.gridfs.find().

Usage

1

Arguments

gridfile

A (mongo.gridfile) object.

Details

It is not absolutely necessary to call this function since R's garbage collection will eventually get around to doing it for you.

See Also

mongo.gridfs.find,
mongo.gridfile,
mongo.gridfs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
    gridfs <- mongo.gridfs.create(mongo, "grid")
    mongo.gridfs.store.file(gridfs, "tests/test.R", "test.R")
    gf <- mongo.gridfs.find(gridfs, "test.R")
    if( !is.null(gf) ){
      print(mongo.gridfile.get.upload.date(gf))
      mongo.gridfile.destroy(gf)
    }
    mongo.gridfs.destroy(gridfs)
}

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.