You are here

protected function AmazonS3StreamWrapper::getLocalPath in AmazonS3 7

Return the local filesystem path.

Parameters

string $uri: Optional URI, supplied when doing a move or rename.

10 calls to AmazonS3StreamWrapper::getLocalPath()
AmazonS3StreamWrapper::dir_opendir in ./AmazonS3StreamWrapper.inc
Support for opendir().
AmazonS3StreamWrapper::getExternalUrl in ./AmazonS3StreamWrapper.inc
Returns a web accessible URL for the resource.
AmazonS3StreamWrapper::mkdir in ./AmazonS3StreamWrapper.inc
Support for mkdir().
AmazonS3StreamWrapper::rename in ./AmazonS3StreamWrapper.inc
Support for rename().
AmazonS3StreamWrapper::stream_flush in ./AmazonS3StreamWrapper.inc
Support for fflush(). Flush current cached stream data to storage.

... See full list

File

./AmazonS3StreamWrapper.inc, line 1042
Drupal stream wrapper implementation for Amazon S3

Class

AmazonS3StreamWrapper
@file Drupal stream wrapper implementation for Amazon S3

Code

protected function getLocalPath($uri = NULL) {
  if (!isset($uri)) {
    $uri = $this->uri;
  }
  $path = str_replace('s3://', '', $uri);
  $path = trim($path, '/');
  return $path;
}