INNER CODE UNIT · C
dir
spheredev/neosphere · src/cell/build.c:424
dir = directory_open(it->fs, path_cstr(origin_path), true);
while ((in_path = directory_next(dir))) {
out_path = path_dup(in_path);
path_relativize(out_path, origin_path);
path_insert_hop(out_path, 0, "$");
if (fs_fexist(it->fs, path_cstr(out_path))) {
visor_print(it->visor, "found existing file '%s'", path_cstr(out_path));
++num_overwriting;
}
path_free(out_path);
}
if (num_overwriting <= 0) {
visor_prompt(it->visor, "title of new game?", title, sizeof title);
visor_prompt(it->visor, "author's name?", author, sizeof author);
visor_prompt(it->visor, "one-line summary?", summary, sizeof summary);
visor_prompt(it->visor, "screen resolution (default is 320x240)?", resolution, sizeof resolution);
visor_end_op(it->visor);