D8 - Get Public and private file path in custom module/code
1) To get the Public directory path in custom module/code
$Public_base_path = \Drupal\Core\StreamWrapper\PublicStream::basePath();
2) To get the Private directory path in custom module/code
$Private_base_path = \Drupal\Core\StreamWrapper\PrivateStream::basePath();
Comments