MCPcopy
hub / github.com/google/clusterfuzz / exists

Function exists

src/clusterfuzz/_internal/google_cloud_utils/storage.py:1048–1057  ·  view source on GitHub ↗

Return whether if a cloud storage file exists.

(cloud_storage_file_path, ignore_errors=False)

Source from the content-addressed store, hash-verified

1046 delay=DEFAULT_FAIL_WAIT,
1047 function='google_cloud_utils.storage.exists')
1048def exists(cloud_storage_file_path, ignore_errors=False):
1049 """Return whether if a cloud storage file exists."""
1050 try:
1051 return bool(_provider().get(cloud_storage_file_path))
1052 except HttpError:
1053 if not ignore_errors:
1054 logs.error('Failed when trying to find cloud storage file %s.' %
1055 cloud_storage_file_path)
1056
1057 return False
1058
1059
1060@retry.wrap(

Callers

nothing calls this directly

Calls 3

_providerFunction · 0.85
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected