dvLocationToPlatform function

String dvLocationToPlatform(
  1. String location
)

The address the browser shows for an internal location: under the mount, the path without it. Unchanged otherwise.

Implementation

String dvLocationToPlatform(String location) {
  final String? mount = _mount;
  if (mount == null) return location;
  final (String path, String rest) = _split(location);
  if (!_under(path, mount)) return location;
  return '${_current!.hostPath(path)}$rest';
}