| /* Copyright 2020 The TensorFlow Authors. All Rights Reserved. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| ==============================================================================*/ |
| #ifndef TENSORFLOW_C_EXPERIMENTAL_FILESYSTEM_PLUGINS_GCS_GCS_FILESYSTEM_H_ |
| #define TENSORFLOW_C_EXPERIMENTAL_FILESYSTEM_PLUGINS_GCS_GCS_FILESYSTEM_H_ |
| |
| #include "google/cloud/storage/client.h" |
| #include "tensorflow/c/experimental/filesystem/filesystem_interface.h" |
| #include "tensorflow/c/tf_status.h" |
| |
| void ParseGCSPath(const std::string& fname, bool object_empty_ok, |
| std::string& bucket, std::string& object, TF_Status* status); |
| |
| namespace tf_gcs_filesystem { |
| void Init(TF_Filesystem* filesystem, TF_Status* status); |
| void Cleanup(TF_Filesystem* filesystem); |
| void NewWritableFile(const TF_Filesystem* filesystem, const char* path, |
| TF_WritableFile* file, TF_Status* status); |
| void NewAppendableFile(const TF_Filesystem* filesystem, const char* path, |
| TF_WritableFile* file, TF_Status* status); |
| } // namespace tf_gcs_filesystem |
| |
| #endif // TENSORFLOW_C_EXPERIMENTAL_FILESYSTEM_PLUGINS_GCS_GCS_FILESYSTEM_H_ |