Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for NewWritableFile (0.25 sec)

  1. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

      Status status = env_->NewWritableFile(filepath, &file);
      if (!status.ok())
        GTEST_SKIP() << "NewWritableFile() not supported: " << status;
    
      const std::string new_filepath = GetURIForPath("a_new_file");
      std::unique_ptr<WritableFile> new_file;
      status = env_->NewWritableFile(filepath, &new_file);
      if (!status.ok())
        GTEST_SKIP() << "NewWritableFile() not supported: " << status;
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  2. tensorflow/c/c_test.c

      char* full_path = malloc(length);
      snprintf(full_path, length, "%s/%s", path, file_name);
    
      TF_WritableFileHandle* h;
      TF_Status* status = TF_NewStatus();
      TF_NewWritableFile(full_path, &h, status);
      if (TF_GetCode(status) != TF_OK) {
        fprintf(stderr, "TF_NewWritableFile failed: %s\n", TF_Message(status));
        return 1;
      }
      fprintf(stderr, "wrote %s\n", full_path);
      free(full_path);
      TF_CloseWritableFile(h, status);
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Apr 24 20:50:35 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. tensorflow/c/env_test.cc

                        << TF_Message(s);
    
        ::tensorflow::string filepath =
            ::tensorflow::io::JoinPath(dirpath, "somefile.txt");
        TF_WritableFileHandle* handle;
        TF_NewWritableFile(filepath.c_str(), &handle, s);
        ASSERT_TF_OK(s) << "NewWritableFile failed for " << filepath << ": "
                        << TF_Message(s);
    
        const char* data = "Hello, world!\n";
        TF_AppendWritableFile(handle, data, strlen(data), s);
    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)
  4. tensorflow/c/env.cc

        stats->is_directory = cc_stats.is_directory;
      }
    }
    
    void TF_NewWritableFile(const char* filename, TF_WritableFileHandle** handle,
                            TF_Status* status) {
      std::unique_ptr<::tensorflow::WritableFile> f;
      TF_SetStatus(status, TF_OK, "");
      ::tensorflow::Status s =
          ::tensorflow::Env::Default()->NewWritableFile(filename, &f);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
    
      if (s.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)
  5. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

        close(fd);
        return;
      }
    
      file->plugin_file = new tf_random_access_file::PosixFile({strdup(path), fd});
      TF_SetStatus(status, TF_OK, "");
    }
    
    static void NewWritableFile(const TF_Filesystem* filesystem, const char* path,
                                TF_WritableFile* file, TF_Status* status) {
      FILE* f = fopen(path, "w");
      if (f == nullptr) {
    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)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.h

    void Cleanup(TF_Filesystem* filesystem);
    void NewRandomAccessFile(const TF_Filesystem* filesystem, const char* path,
                             TF_RandomAccessFile* file, TF_Status* status);
    void NewWritableFile(const TF_Filesystem* filesystem, const char* path,
                         TF_WritableFile* file, TF_Status* status);
    void NewAppendableFile(const TF_Filesystem* filesystem, const char* path,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:37:41 GMT 2020
    - 5.2K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

            });
        reader->plugin_file = nullptr;
        return reader;
      }
    
      void WriteString(const std::string& path, const std::string& content) {
        auto writer = GetWriter();
        tf_gcs_filesystem::NewWritableFile(filesystem_, path.c_str(), writer.get(),
                                           status_);
        if (TF_GetCode(status_) != TF_OK) return;
        tf_writable_file::Append(writer.get(), content.c_str(), content.length(),
    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)
  8. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      return StatusFromTF_Status(plugin_status.get());
    }
    
    Status ModularFileSystem::NewWritableFile(
        const std::string& fname, TransactionToken* token,
        std::unique_ptr<WritableFile>* result) {
      if (ops_->new_writable_file == nullptr)
        return errors::Unimplemented(tensorflow::strings::StrCat(
            "Filesystem for ", fname, " does not support NewWritableFile()"));
    
      UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
    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)
  9. tensorflow/c/env.h

    // appending data to the file. If status is TF_OK, *handle is updated and the
    // caller is responsible for freeing it (see TF_CloseWritableFile).
    TF_CAPI_EXPORT extern void TF_NewWritableFile(const char* filename,
                                                  TF_WritableFileHandle** handle,
                                                  TF_Status* status);
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Sat Jan 09 02:53:27 GMT 2021
    - 9.6K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/modular_filesystem.h

      TF_USE_FILESYSTEM_METHODS_WITH_NO_TRANSACTION_SUPPORT;
    
      Status NewRandomAccessFile(
          const std::string& fname, TransactionToken* token,
          std::unique_ptr<RandomAccessFile>* result) override;
      Status NewWritableFile(const std::string& fname, TransactionToken* token,
                             std::unique_ptr<WritableFile>* result) override;
      Status NewAppendableFile(const std::string& fname, TransactionToken* token,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Oct 12 08:49:52 GMT 2023
    - 8.9K bytes
    - Viewed (0)
Back to top