isWindowsRemotePath function

bool isWindowsRemotePath(
  1. String path
)

Whether path is a Windows absolute path: C:\…, C:/…, a bare C:, or a share (\\server\share). A //-prefixed path is not taken as one: on a POSIX node that is an ordinary absolute path.

Implementation

bool isWindowsRemotePath(String path) =>
    RegExp(r'^[A-Za-z]:([\\/]|$)').hasMatch(path) || path.startsWith(r'\\');