Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Constructs a URI string for the given object.

For example if we were iterating gs://*, obj could be an object in one
of the user's buckets enumerated by the ls command.

Args:
  uri: base StorageUri being iterated.
  obj: object (Key) being listed.
  all_versions: Whether or not to include versioning.
(more...)

        def UriStrForObj(uri, obj, all_versions):
  """Constructs a URI string for the given object.

  For example if we were iterating gs://*, obj could be an object in one
  of the user's buckets enumerated by the ls command.

  Args:
    uri: base StorageUri being iterated.
    obj: object (Key) being listed.
    all_versions: Whether or not to include versioning.

  Returns:
    URI string.
  """
  version_info = ''
  if all_versions:
    if uri.get_provider().name == 'google' and obj.generation:
      version_info = '#%s' % obj.generation
    elif uri.get_provider().name == 'aws' and obj.version_id:
      if isinstance(obj, DeleteMarker):
        version_info = '#' + str(obj.version_id)
      else:
        version_info = '#' + str(obj.version_id)
    else:
      version_info = ''
  return '%s://%s/%s%s' % (uri.scheme, obj.bucket.name, obj.name,
                           version_info)
        


src/g/s/gsutil-3.42/gslib/commands/du.py   gsutil(Download)
from gslib.command import URIS_START_ARG
from gslib.commands.ls import UriOnlyBlrExpansionIterator
from gslib.commands.ls import UriStrForObj
from gslib.exception import CommandException
from gslib.help_provider import HELP_NAME
    uri = bucket_listing_ref.GetUri()
    obj = bucket_listing_ref.GetKey()
    uri_str = UriStrForObj(uri, obj, self.all_versions)
 
    if isinstance(obj, DeleteMarker):

src/g/s/gsutil-HEAD/gslib/commands/du.py   gsutil(Download)
from gslib.command import URIS_START_ARG
from gslib.commands.ls import UriOnlyBlrExpansionIterator
from gslib.commands.ls import UriStrForObj
from gslib.exception import CommandException
from gslib.help_provider import HELP_NAME
    uri = bucket_listing_ref.GetUri()
    obj = bucket_listing_ref.GetKey()
    uri_str = UriStrForObj(uri, obj, self.all_versions)
 
    if isinstance(obj, DeleteMarker):