ZF-11883: Zend_Cloud_StorageService_Adapter_FileSystem::storeItem() should create intermediate folders


I am using the Zend_Cloud_StorageService as I am hoping to use the FileSystem adapter on internal servers and the S3 adapter on external servers.

I think it is therefore wrong that Zend_Cloud_StorageService_Adapter_FileSystem::storeItem() requires that the path provided in the first argument already exists within the path specified when instantiating the class.

I expect Zend_Cloud_StorageService_Adapter_FileSystem::storeItem() to behave the same as the S3 adapter, so that it automatically creates those intermediate folders. Therefore I can easily switch between implementations of Zend_Cloud_StorageService_Adapter.


I can't seem to find where I attach files, so here's a patch[0] which fixes the issue for me.

[0] - http://pastebin.com/g0pzkgPa

Ignore the last comment, this patch[0] includes unit tests as well as fix

[0] - http://pastebin.com/SaMN9A30