isParentOf method

bool isParentOf(
  1. Path other
)

Implementation

bool isParentOf(Path other) {
  if (isEmpty) {
    return true;
  }
  if (other.isEmpty) {
    return false;
  }
  if (length >= other.length) {
    return false;
  }
  for (var i = 0; i < length; i++) {
    if (this[i] != other[i]) {
      return false;
    }
  }
  return true;
}