toPlatformPath function

String toPlatformPath(
  1. String pth
)

Converts the given path to a platform-specific path.

It does this by replacing instances of / and \ with the platform-specific path separator.

Implementation

// ignore: prefer_expression_function_bodies
String toPlatformPath(String pth) {
  final separator = p.separator;

  return pth.replaceAll(r'\', separator).replaceAll('/', separator);
}