code: private boolean caseMapCheck(Path f, RelativePath name) {
          if (fileSystemIsCaseSensitive) return true;
          // Note that toRealPath() returns the case-sensitive
          // spelled file name.
          String path;
          char sep;
          try {
              path = f.toRealPath(LinkOption.NOFOLLOW_LINKS).toString();
              sep = f.getFileSystem().getSeparator().charAt(0);
          } catch (IOException ex) {
              return false;
          }
          char[] pcs = path.toCharArray();
          char[] ncs = name.path.toCharArray();
          int i = pcs.length - 1;
          int j = ncs.length - 1;
          while (i >= 0 && j >= 0) {
              while (i >= 0 && pcs[i] == sep) i--;
              while (j >= 0 && ncs[j] == '/') j--;
              if (i >= 0 && j >= 0) {
                  if (pcs[i] != ncs[j]) return false;
                  i--;
                  j--;
              }
          }
          return j < 0;
      }
docs: Hack to make Windows case sensitive. Test whether given path
  ends in a string of characters with the same case as given name.
  Ignore file separators in both path and name.