mongo.gridfs(rmongodb)
mongo.gridfs()所属R语言包:rmongodb
The mongo.gridfs class
mongo.gridfs类
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Objects of class "mongo.gridfs" are used to store and/or access a "Grid File System" (GridFS) on a MongoDB server. While primarily intended to store large documents that won't fit on the server as a single BSON object, GridFS may also be used to store large numbers of smaller files.
对象类“mongo.gridfs”被用来存储和/或访问MongoDB服务器上的一个“网格文件系统”(GridFS)。虽然主要用来存储大型文件,将不适合在服务器上作为一个单一的BSON对象,GridFS也可以用来存储大量小文件。
See http://www.mongodb.org/display/DOCS/GridFS and<br> http://www.mongodb.org/display/DOCS/When+to+use+GridFS.
请参阅http://www.mongodb.org/display/DOCS/GridFS和<BR> http://www.mongodb.org/display/DOCS/When+to+use+GridFS。
mongo.gridfs objects have "mongo.gridfs" as their class and contain an externally managed pointer to the actual data used to manage operations on the GridFS.<br> This pointer is stored in the "mongo.gridfs" attribute of the object. The object also has a "mongo" attribute holding a pointer to the mongo connection object used in creation to prevent garbage collection on the mongo object while the mongo.gridfile is still active.
mongo.gridfs对象有“mongo.gridfs”作为自己的类,并包含外部管理的GridFS管理业务的实际数据的指针。<br>此指针存储在“mongo.gridfs”属性对象。的对象也有一个“蒙戈”属性的创建中使用,以防止垃圾收集的的蒙戈对象上,而mongo.gridfile仍处于活动状态的的蒙戈连接对象指针。
Objects of class "mongo.gridfile" are used to access gridfiles and read from them.
使用对象类“mongo.gridfile”,访问gridfiles并从其中读取。
Objects of class "mongo.gridfile.writer" are used to write data to the GridFS.
用于将数据写入到GridFS的类“mongo.gridfile.writer”的对象。
参见----------See Also----------
mongo.gridfs.destroy,<br> mongo.gridfs.store.file,<br> mongo.gridfs.remove.file,<br> mongo.gridfs.store,<br> mongo.gridfile.writer.create,<br> mongo.gridfs.find.
mongo.gridfs.destroy,参考mongo.gridfs.store.file,参考mongo.gridfs.remove.file,参考mongo.gridfs.store,参考mongo.gridfile.writer.create,参考mongo.gridfs.find 。
实例----------Examples----------
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[GridFS文件服务器作为一个本地文件复制到]
mongo.gridfs.store.file(gridfs, "../test.R", "test.R")
# locate the file on the server[定位服务器上的文件]
gf <- mongo.gridfs.find(gridfs, "test.R")
print(gf)
# and pipe it to an R connection object[和管道的R连接对象]
test.R <- file("test2.R")
mongo.gridfile.pipe(gf, test.R)
mongo.gridfile.destroy(gf)
mongo.gridfs.destroy(gridfs)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|