absolutePosixPath property

String get absolutePosixPath

Implementation

String get absolutePosixPath {
  var res = lib_path.posix.fromUri(absolute.uri);

  if (Platform.isWindows) {
    // An absolute path on windows starts with a drive letter like "C:\Users\peter"
    // converting that to a posix path yield "/C:/Users/peter", but the '/' before
    // the drive letter causes errors, so we need to remove that.
    res = res.substring(1);
  }

  return res;
}