(gcs_file_path, credentials=None, storage_service=None)
Check whether the file exists, in GCS.

  Args:
    gcs_file_path: The target file path; should have the 'gs://' prefix.
    credentials: Optional credential to be used to load the file from gcs.
    storage_service: GCS API service object.

  Returns:
    True if the file's there.
Check whether the file exists, in GCS.
Check whether the file exists in GCS .
def _file_exists_in_gcs(gcs_file_path, credentials=None, storage_service=None):
  """Check whether the file exists, in GCS.

  Args:
    gcs_file_path: The target file path; should have the 'gs://' prefix.
    credentials: Optional credential to be used to load the file from gcs.
    storage_service: GCS API service object.

  Returns:
    True if the file's there.
  """
  if storage_service is None:
    storage_service = get_storage_service(credentials)

  bucket_name, object_name = gcs_file_path[len('gs://'):].split('/', 1)
  request = storage_service.objects().get(
      bucket=bucket_name, object=object_name, projection='noAcl')
  try:
    request.execute()
    return True
  except googleapiclient.errors.HttpError:
    return False
def _file_exists_in_gcs ( gcs_file_path , credentials = None , storage_service = None ) : if storage_service is None : storage_service = get_storage_service ( credentials ) bucket_name , object_name = gcs_file_path [ len ( 'gs://' ) : ] . split ( '/' , 1 ) request = storage_service . objects ( ) . get ( bucket = bucket_name , object = object_name , projection = 'noAcl' ) try : request . execute ( ) return True except googleapiclient . errors . HttpError : return False