public static function containsPath(/*string*/ $top, /*string*/ $sub) {
    $top = self::realPath($top);
    $sub = self::realPath($sub);
    return self::isDir($top) && self::isDir($sub) &&
      0 === strpos($sub, $top . '/');
  }