code: void dfsPathSplit(String path, String[] result)
      {
          int ri = 0, rlast = result.length - 1;
          int i = 0, b = 0, len = path.length();
  
          do {
              if (ri == rlast) {
                  result[rlast] = path.substring(b);
                  return;
              }
              if (i == len || path.charAt(i) == '\\') {
                  result[ri++] = path.substring(b, i);
                  b = i + 1;
              }
          } while (i++ < len);
  
          while (ri < result.length) {
              result[ri++] = "";
          }
      }
docs: /* Split DFS path like \fs1.example.com\root5\link2\foo\bar.txt into at
  most 3 components (not including the first index which is always empty):
  result[0] = ""
  result[1] = "fs1.example.com"
  result[2] = "root5"
  result[3] = "link2\foo\bar.txt"