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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Iterator that expands a BucketListingRef that contains only a URI (i.e.,
didn't come from a bucket listing), yielding BucketListingRefs to which it
expands. This case happens for BLR's instantiated from a user-provided URI.

Note that we can't use NameExpansionIterator here because it produces an
iteration over the full object names (e.g., expanding "gs://bucket" to
"gs://bucket/dir/o1" and "gs://bucket/dir/o2"), while for the ls command
we need also to see the intermediate directories (like "gs://bucket/dir").

src/g/s/gsutil-3.42/gslib/commands/du.py   gsutil(Download)
from gslib.command import SUPPORTED_SUB_ARGS
from gslib.command import URIS_START_ARG
from gslib.commands.ls import UriOnlyBlrExpansionIterator
from gslib.commands.ls import UriStrForObj
from gslib.exception import CommandException
      blr_iterator = PluralityCheckableIterator(
          UriOnlyBlrExpansionIterator(
              self, blr, all_versions=self.all_versions))
      if blr_iterator.is_empty() and not ContainsWildcard(blr.GetUriString()):
        raise CommandException('No such object %s' % blr.GetUriString())

src/g/s/gsutil-HEAD/gslib/commands/du.py   gsutil(Download)
from gslib.command import SUPPORTED_SUB_ARGS
from gslib.command import URIS_START_ARG
from gslib.commands.ls import UriOnlyBlrExpansionIterator
from gslib.commands.ls import UriStrForObj
from gslib.exception import CommandException
      blr_iterator = PluralityCheckableIterator(
          UriOnlyBlrExpansionIterator(
              self, blr, all_versions=self.all_versions))
      if blr_iterator.is_empty() and not ContainsWildcard(blr.GetUriString()):
        raise CommandException('No such object %s' % blr.GetUriString())