title: Google Cloud storage - getting objects via wildcard
body: <p>So, using gsutil, I can run this:</p>
  
  <pre><code>gsutil ls gs://&lt;my bucket name&gt;/AR7020014/agent_directory_photos/adp_42643_*
  </code></pre>
  
  <p>and get a list of filenames. I would really love to do this in my PHP code. I have tried
  this:</p>
  
  <pre><code>$service = new Google_Service_Storage( $authenticated_client );
  
  $params = [ 'prefix' =&gt; 'AR7020014/agent_directory_photos/adp_42643_*', maxResults 10 ];
  
  $objects = $service-&gt;objects-&gt;listObjects(&lt;my bucket name&gt;, $params);
  </code></pre>
  
  <p>but the returned object set contains no items. I don't want to do a directory scan, the number of files in this particular folder can get very large. </p>