removePrefix function

String removePrefix(
  1. String path
)

Returns the file system path with the prefix removed.

Implementation

String removePrefix(String path) {
  String result;
  if (Platform.isWindows && path.startsWith(kWindowsStoragePathPrefix)) {
    result = normalize(path.substring(kWindowsStoragePathPrefix.length));
  } else {
    result = normalize(path);
  }

  return removeTrailingSlash(result);
}