Replacement for _drush_file_private_path() I'm trying to get File Permissions working in Drupal 8.9 with Drush 9. The old code calls _drush_file_private_path(), which doesn't exist anymore, and _drush_file_public_path() is probably a no-go as well.
What is the proper way to do the following in Drush 9?
define('DS', DIRECTORY_SEPARATOR);

// Define default paths and variables.
$default = 'sites' . DS . 'default';
$private = $default . DS . 'private';
$files = $default . DS . 'files';
$directories = array();

// Check for Private Files subdirectory.
$private_directory = _drush_file_private_path();
if (empty($private_directory)) {
  $private_directory = $private;
}
$directories[] = $private_directory;

// Check for Public Files subdirectory.
$public_directory = _drush_file_public_path();
if (empty($public_directory)) {
  $public_directory = $files;
}
$directories[] = $public_directory;

As an additional note, it would be amazing if a resource existed to see all deprecated/removed functions and their equivalent replacements. I can't even get decent results when using a search engine and the function name.
_drush_file_private_path()
_drush_file_public_path()

in the end were just wrapper functions of

\Drupal\Core\StreamWrapper\PrivateStream::basePath()
\Drupal\Core\StreamWrapper\PublicStream::basePath()

And you probably get the same from

\Drupal::service('file_system')-&gt;realpath('private://')
\Drupal::service('file_system')-&gt;realpath('public://')