drupal_realpath

drupal_realpath($uri)

Resolves the absolute filepath of a local URI or filepath.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::realpath().

Related topics

File interface
Common file handling functions.

File

core/includes/file.inc, line 1127
API for handling file uploads and server file management.

Code

1
2
3
function drupal_realpath($uri) {
  return \Drupal::service('file_system')->realpath($uri);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.