hash method

int hash(
  1. String path

Returns a hash code for path that matches the semantics of equals.

Note that the same path may have different hash codes in different Contexts.


int hash(String path) {
  // Make [path] absolute to ensure that equivalent relative and absolute
  // paths have the same hash code.
  path = absolute(path);

  final result = _hashFast(path);
  if (result != null) return result;

  final parsed = _parse(path);
  return _hashFast(parsed.toString())!;