Skip to main content
improved formatting and punctuation
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Finally I got the solution by digging drupal cores,Drupal code.
We can get the real_pathreal path or absolute_pathabsolute path by using the Drupal file_system Servicefile_system service.

$absolute_path = \Drupal::service('file_system')->realpath('public://2016-03/Places_2.xlsx');

Finally I got the solution by digging drupal cores, We can get the real_path or absolute_path by using Drupal file_system Service

\Drupal::service('file_system')->realpath('public://2016-03/Places_2.xlsx')

Finally I got the solution by digging Drupal code.
We can get the real path or absolute path by using the file_system service.

$absolute_path = \Drupal::service('file_system')->realpath('public://2016-03/Places_2.xlsx');
Source Link
Nisam
  • 725
  • 1
  • 6
  • 11

Finally I got the solution by digging drupal cores, We can get the real_path or absolute_path by using Drupal file_system Service

\Drupal::service('file_system')->realpath('public://2016-03/Places_2.xlsx')