According to the Rackspace docs you should be able to get a listing of pseudo-directories by passing 'delimiter' and 'prefix' params to getObjects, something like:
$cf->getObjects('mycontainer', array('delimiter' => '/', 'prefix' => 'path/to/mydir/');
But if you try this you get a Zend_Service_Rackspace_Files_Exception - "You must pass the name of the object in the array (name)".
The problem is that when listing directories the response contains a 'subdir' element, not a 'name' element. The attached patch allows Zend_Service_Rackspace_Files_Object to deal with this correctly.
(Originally posted by: froschdesign on 03/25/13)
can you also add some unit tests?
(Originally posted by: kynx on 03/25/13)
Yeah, will do. I'm also trying to track these issues against ZF2 and tend to do tests there... but it's all becoming a bit of a headache :|
Offline test. Not sure how I'd go about writing an online test. Pointers welcome!
This issue was ported from the ZF2 Jira Issue Tracker at
Known GitHub users mentioned in the original message or comment:
Fixed #68: Zend_Service_Rackspace_Files::getObjects() throws exceptio…
…n when listing pseudo-directories
Fixes CS for #68