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

Function write_string_to_file

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

Writes a string to a given file. Args: filename: string, path to a file file_content: string, contents that need to be written to the file Raises: errors.OpError: If there are errors during the operation.

(filename, file_content)

Source from the content-addressed store, hash-verified

334
335
336def write_string_to_file(filename, file_content):
337 """Writes a string to a given file.
338
339 Args:
340 filename: string, path to a file
341 file_content: string, contents that need to be written to the file
342
343 Raises:
344 errors.OpError: If there are errors during the operation.
345 """
346 with FileIO(filename, mode="w") as f:
347 f.write(file_content)
348
349
350@tf_export(v1=["gfile.Glob"])

Callers 2

Calls 2

FileIOClass · 0.85
writeMethod · 0.45

Tested by 1