Learn R Programming

rmongodb (version 1.8.0)

mongo.gridfs.destroy: Destroy a mongo.gridfs object

Description

Releases the resources associated with a mongo.gridfs object.

Usage

mongo.gridfs.destroy(gridfs)

Arguments

gridfs
A (mongo.gridfs) 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, mongo.gridfs.create, mongo.gridfs.store.file.

Examples

Run this code
mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
    gridfs <- mongo.gridfs.create(mongo, "grid")
    # Copy a local file to the server as a gridfs file
    mongo.gridfs.store.file(gridfs, "tests/test.R", "test.R")
    mongo.gridfs.destroy(gridfs)
}

Run the code above in your browser using DataLab