- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for fclose (0.17 sec)
-
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc
// TODO(b/144055243): This should use `fsync`/`sync`. Flush(file, status); } static void Close(const TF_WritableFile* file, TF_Status* status) { auto posix_file = static_cast<PosixFile*>(file->plugin_file); if (fclose(posix_file->handle) != 0) TF_SetStatusFromIOError(status, errno, posix_file->filename); else TF_SetStatus(status, TF_OK, ""); }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Sun Mar 24 20:08:23 GMT 2024 - 15.8K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc
if (dst_fd < 0) { close(src_fd); return -1; } // Both files have been opened, do the transfer. // Since errno would be overridden by `close` below, save it here. int error_code = 0; if (CopyFileContents(dst_fd, src_fd, size) < 0) error_code = errno; close(src_fd); close(dst_fd); if (error_code != 0) { errno = error_code; return -1;
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jan 16 05:36:52 GMT 2020 - 2.1K bytes - Viewed (1) -
tensorflow/c/experimental/filesystem/plugins/gcs/gcs_helper.cc
TempFile::TempFile(TempFile&& rhs) : std::fstream(std::move(rhs)), name_(std::move(rhs.name_)) {} TempFile::~TempFile() { std::fstream::close(); std::remove(name_.c_str()); } const std::string TempFile::getName() const { return name_; } bool TempFile::truncate() { std::fstream::close(); std::fstream::open(name_, std::ios::binary | std::ios::out); return std::fstream::is_open();
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Fri Jun 26 14:56:58 GMT 2020 - 1.3K bytes - Viewed (0) -
tensorflow/c/c_api.cc
"TF_WhileParams must be created by successful TF_NewWhile() call"); return false; } return true; } bool ValidateInputWhileParams(const TF_WhileParams& params, TF_Status* s) { if (params.cond_output.oper == nullptr) { s->status = InvalidArgument("TF_WhileParams `cond_output` field isn't set"); return false; } for (int i = 0; i < params.ninputs; ++i) {
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/env_test.cc
// There should only be one file in this directory. ASSERT_FALSE(TF_StringStreamNext(children, &childpath)); ASSERT_EQ(childpath, nullptr); TF_StringStreamDone(children); TF_FileStatistics stats; TF_FileStat(filepath.c_str(), &stats, s); ASSERT_EQ(stats.length, strlen(data)); ASSERT_FALSE(stats.is_directory); ASSERT_GT(stats.mtime_nsec, 0);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Dec 10 20:52:48 GMT 2018 - 4.2K bytes - Viewed (0) -
tensorflow/c/env.cc
auto* cc_file = reinterpret_cast<::tensorflow::WritableFile*>(handle); TF_SetStatus(status, TF_OK, ""); ::tensorflow::Set_TF_Status_from_Status(status, cc_file->Close()); delete cc_file; } void TF_SyncWritableFile(TF_WritableFileHandle* handle, TF_Status* status) { auto* cc_file = reinterpret_cast<::tensorflow::WritableFile*>(handle); TF_SetStatus(status, TF_OK, "");
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Aug 11 01:20:50 GMT 2021 - 7K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc
std::string bucket, object; ParseGCSPath(path, false, &bucket, &object, status); if (TF_GetCode(status) != TF_OK) return ::testing::AssertionFailure() << TF_Message(status); auto writer = gcs_client->WriteObject(bucket, object); writer.write(content + offset, length); writer.Close(); if (writer.metadata()) { return ::testing::AssertionSuccess(); } else {
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Mon Aug 31 12:04:23 GMT 2020 - 24.9K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc
if (TF_GetCode(status) != TF_OK) return false; if (is_folder) return true; bool is_object = ObjectExists(gcs_file, path, bucket, object, status); if (TF_GetCode(status) != TF_OK) return false; if (is_object) { TF_SetStatus( status, TF_FAILED_PRECONDITION, absl::StrCat("The specified path ", path, " is not a directory.") .c_str()); return false; }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Aug 23 06:55:53 GMT 2023 - 46.9K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/modular_filesystem_test.cc
status = file->Close(); if (!status.ok()) GTEST_SKIP() << "Close() not supported: " << status; FileStatistics stat; status = env_->Stat(filepath, &stat); EXPECT_PRED2(UnimplementedOrReturnsCode, status, Code::OK); if (!status.ok()) GTEST_SKIP() << "Stat() not supported: " << status; EXPECT_FALSE(stat.is_directory); EXPECT_EQ(stat.length, test_data.size()); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Fri May 27 20:25:58 GMT 2022 - 71K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/modular_filesystem.cc
return StatusFromTF_Status(plugin_status.get()); } Status ModularWritableFile::Close() { if (ops_->close == nullptr) return errors::Unimplemented( tensorflow::strings::StrCat("Close() not implemented for ", filename_)); UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus); ops_->close(file_.get(), plugin_status.get()); return StatusFromTF_Status(plugin_status.get()); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Sep 06 19:12:29 GMT 2023 - 23.1K bytes - Viewed (0)