Closed nao-pon closed 9 years ago
copy.com driver. I sent pull request https://github.com/thephpleague/flysystem-copy/pull/8 .
I'm not sure how reliable this is, because there are a lot of magic methods to call functions, like in plugins. And in cached adapters etc. Perhaps use a try/catch to try to get the url?
@barryvdh Thanks!
It's right of you to say certainly. I'm thinking to use in the inherited class in my project.
try/catch is necessary!
That this was rejected, I misunderstood.
Is there a possibility merged by using try/cache?
I didn't say it was rejected, but could probably be simplified a bit. Maybe not checking the url but just the try catch
Hmm, let me think about this. Not really sure what the best way is. Usually extra functionality for Flysystem is provided with a plugin, so perhaps I could create a plugin for the url functionality.
Yet, I don't understand well about flysystem so I have expectations for your plugin!
I've added a Plugin which does pretty much the same. Not really good yet, I'd rather check if an actual implementation has a specific method, so you know what to expect, instead of blindly calling getUrl().
I didn't really test this much, because I don't use Copy.com or other drivers that have public urls.. Can you give it a try?
It's great! I tested.. worked fine. But it need set $stat['url']=1 in _stat() for call getUrl().
How about #7
Which adapters have these?