MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / write

Method write

tensorflow/python/lib/io/file_io.py:104–108  ·  view source on GitHub ↗

Writes file_content to the file. Appends to the end of the file.

(self, file_content)

Source from the content-addressed store, hash-verified

102 return stat(self.__name).length
103
104 def write(self, file_content):
105 """Writes file_content to the file. Appends to the end of the file."""
106 self._prewrite_check()
107 pywrap_tensorflow.AppendToFile(
108 compat.as_bytes(file_content), self._writable_file)
109
110 def read(self, n=-1):
111 """Returns the contents of a file as a string.

Callers 15

testMultipleFilesMethod · 0.95
testReadlinesMethod · 0.95
testEofMethod · 0.95
sed_in_placeFunction · 0.45
write_to_bazelrcFunction · 0.45
setup_pythonFunction · 0.45
gen_cluster_infoFunction · 0.45
gen_cluster_infoFunction · 0.45
gen_cluster_infoFunction · 0.45
pkl2txtFunction · 0.45
gen_cluster_infoFunction · 0.45
gen_cluster_infoFunction · 0.45

Calls 1

_prewrite_checkMethod · 0.95

Tested by 15

testMultipleFilesMethod · 0.76
testReadlinesMethod · 0.76
testEofMethod · 0.76
mainMethod · 0.36
testBasicsMethod · 0.36
test_replace_refesMethod · 0.36
testInplaceMethod · 0.36