public static Cons parseDirectoryPath(String path) {
    { char separator = '|';
      int length = path.length();
      int start = 0;
      int end = 0;
      Cons parsedpath = Stella.NIL;

      loop000 : for (;;) {
        end = Native.string_position(path, separator, start);
        parsedpath = Cons.cons(StringWrapper.wrapString(Stella.fileNameAsDirectory(Native.string_subsequence(path, start, end))), parsedpath);
        if ((end != Stella.NULL_INTEGER) &&
            (end < (length - 1))) {
          start = end + 1;
        }
        else {
          break loop000;
        }
      }
      return (parsedpath.reverse());
    }
  }