0

I have StreamWrapper for Amazon S3 and I have noticed chmod is not working. I have looked into the \Drupal\Core\File\FileSystemInterface::chmod and it clearly states that contrib modules should provide their own handling since PHP's chmod does not support streams. I have looked at services and it looks like the file_system service is not a plugin manager and it does not have service tags.

So how can I provide my own FileSystem for my stream?

  • php.net/manual/en/streamwrapper.stream-metadata.php seems to say that calling chmod on a stream URI will call this method. Is that just bad docs on php.net? – mradcliffe Mar 14 '16 at 19:24
  • Oh great. I didn't know that. I can just adjust the \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_metadata in my stream. Thanks. – user21641 Mar 14 '16 at 21:37
  • @mradcliffe feel free to file documentation bugs on php.net, I will see what I can do. – user49 Mar 15 '16 at 8:16
  • @ivanjaros feel free to file core documentation bugs, the distinction between FileSystemInterface (which is just drupal_chmod converted from D7) and PhpStreamWrapperInterface (which are for stream wrapper) is not clear . The two interfaces need to mention each other and explain the (huge) difference. – user49 Mar 15 '16 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy