MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / read

Method read

mongoengine/fields.py:1804–1812  ·  view source on GitHub ↗
(self, size=-1)

Source from the content-addressed store, hash-verified

1802 self.newfile.writelines(lines)
1803
1804 def read(self, size=-1):
1805 gridout = self.get()
1806 if gridout is None:
1807 return None
1808 else:
1809 try:
1810 return gridout.read(size)
1811 except Exception:
1812 return ""
1813
1814 def delete(self):
1815 # Delete file from GridFS, FileField still remains

Callers 8

setup.pyFile · 0.80
get_fileFunction · 0.80
test_file_fieldsMethod · 0.80
test_file_fields_setMethod · 0.80
test_file_uniquenessMethod · 0.80
test_file_multidbMethod · 0.80

Calls 1

getMethod · 0.95

Tested by 7

get_fileFunction · 0.64
test_file_fieldsMethod · 0.64
test_file_fields_setMethod · 0.64
test_file_uniquenessMethod · 0.64
test_file_multidbMethod · 0.64