| 1053 | } |
| 1054 | |
| 1055 | Status GcsFileSystem::NewWritableFile(const string& fname, |
| 1056 | std::unique_ptr<WritableFile>* result) { |
| 1057 | string bucket, object; |
| 1058 | TF_RETURN_IF_ERROR(ParseGcsPath(fname, false, &bucket, &object)); |
| 1059 | result->reset(new GcsWritableFile(bucket, object, this, &timeouts_, |
| 1060 | [this, fname]() { ClearFileCaches(fname); }, |
| 1061 | retry_config_)); |
| 1062 | return Status::OK(); |
| 1063 | } |
| 1064 | |
| 1065 | // Reads the file from GCS in chunks and stores it in a tmp file, |
| 1066 | // which is then passed to GcsWritableFile. |