You are here

public function S3fsFileService::realpath in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x src/S3fsFileService.php \Drupal\s3fs\S3fsFileService::realpath()

Resolves the absolute filepath of a local URI or filepath.

The use of this method is discouraged, because it does not work for remote URIs. Except in rare cases, URIs should not be manually resolved.

Only use this function if you know that the stream wrapper in the URI uses the local file system, and you need to pass an absolute path to a function that is incompatible with stream URIs.

Parameters

string $uri: A stream wrapper URI or a filepath, possibly including one or more symbolic links.

Return value

string|false The absolute local filepath (with no symbolic links) or FALSE on failure.

Overrides FileSystemInterface::realpath

See also

\Drupal\Core\StreamWrapper\StreamWrapperInterface::realpath()

http://php.net/manual/function.realpath.php

2 calls to S3fsFileService::realpath()
S3fsFileService::move in src/S3fsFileService.php
Moves a file to a new location without database changes or hook invocation.
S3fsFileService::prepareDestination in src/S3fsFileService.php
Prepares the destination for a file copy or move operation.

File

src/S3fsFileService.php, line 144

Class

S3fsFileService
Provides helpers to operate on files and stream wrappers.

Namespace

Drupal\s3fs

Code

public function realpath($uri) {
  return $this->decorated
    ->realpath($uri);
}