code: private function fixDirectorySeparator($path): string
      {
          $path = str_replace("\\", DIRECTORY_SEPARATOR, $path);
          $path = str_replace("/", DIRECTORY_SEPARATOR, $path);
          
          return $path;
      }
docs: Generate a platform specific path by replacing invalid directory separators
  
  @param string $path
  The path to check
  @return string The corrected path