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

Function WriteStringToFile

tensorflow/core/platform/env.cc:423–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423Status WriteStringToFile(Env* env, const string& fname,
424 const StringPiece& data) {
425 std::unique_ptr<WritableFile> file;
426 Status s = env->NewWritableFile(fname, &file);
427 if (!s.ok()) {
428 return s;
429 }
430 s = file->Append(data);
431 if (s.ok()) {
432 s = file->Close();
433 }
434 return s;
435}
436
437Status FileSystemCopyFile(FileSystem* src_fs, const string& src,
438 FileSystem* target_fs, const string& target) {

Callers 15

TESTFunction · 0.85
TestConstantFoldingMethod · 0.85
RunFunction · 0.85
RunFunction · 0.85
CopyExportFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
CompilePtxFunction · 0.85
CompileGraphFunction · 0.85
MainFunction · 0.85

Calls 4

NewWritableFileMethod · 0.45
okMethod · 0.45
AppendMethod · 0.45
CloseMethod · 0.45

Tested by 15

TESTFunction · 0.68
TestConstantFoldingMethod · 0.68
CopyExportFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
CompareWithGoldenFileFunction · 0.68
TESTFunction · 0.68
RunFileCheckFunction · 0.68
WriteLiteralToTempFileFunction · 0.68