You are here

public function S3fsStreamWrapper::getOptions in S3 File System 7.3

Get the stream's context options or remove them if wanting default.

Parameters

bool $removeContextData: Whether to remove the stream's context information.

Return value

array An array of options.

2 calls to S3fsStreamWrapper::getOptions()
S3fsStreamWrapper::getCommandParams in ./S3fsStreamWrapper.inc
Return bucket and key for a command array.
S3fsStreamWrapper::stream_flush in ./S3fsStreamWrapper.inc
Support for fflush(). Flush current cached stream data to a file in S3.

File

./S3fsStreamWrapper.inc, line 1113
Drupal stream wrapper implementation for S3 File System.

Class

S3fsStreamWrapper
The stream wrapper class.

Code

public function getOptions($removeContextData = false) {

  // Context is not set when doing things like stat
  if (is_null($this->context)) {
    $this->context = stream_context_get_default();
  }
  $options = stream_context_get_options($this->context);
  if ($removeContextData) {
    unset($options['client'], $options['seekable'], $options['cache']);
  }
  return $options;
}