Submitted by manoj on

Before

After

file_create_url($uri)

\Drupal::service('file_url_generator')->generateAbsoluteString($uri)

drupal_get_path('module', 'node')

\Drupal::service('extension.list.module')->getPath('node')

drupal_get_path('theme', 'seven')

\Drupal::service('extension.list.theme')->getPath('seven')

drupal_get_filename('module', 'node')

\Drupal::service('extension.list.module')->getPathname('node')

drupal_get_filename('theme', 'seven')

\Drupal::service('extension.list.theme')->getPathname('seven')

drupal_get_filename('theme', 'seven')

\Drupal::service('extension.list.theme')->getPathname('seven')