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

Method GetFileSize

tensorflow/core/platform/cloud/gcs_file_system.cc:1589–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1587}
1588
1589Status GcsFileSystem::GetFileSize(const string& fname, uint64* file_size) {
1590 if (!file_size) {
1591 return errors::Internal("'file_size' cannot be nullptr.");
1592 }
1593
1594 // Only validate the name.
1595 string bucket, object;
1596 TF_RETURN_IF_ERROR(ParseGcsPath(fname, false, &bucket, &object));
1597
1598 FileStatistics stat;
1599 TF_RETURN_IF_ERROR(Stat(fname, &stat));
1600 *file_size = stat.length;
1601 return Status::OK();
1602}
1603
1604Status GcsFileSystem::RenameFile(const string& src, const string& target) {
1605 if (!IsDirectory(src).ok()) {

Callers 1

TESTFunction · 0.45

Calls 3

InternalFunction · 0.85
ParseGcsPathFunction · 0.85
StatClass · 0.85

Tested by 1

TESTFunction · 0.36