Skip to main content

ensure_gcode_json

Function ensure_gcode_json 

Source
pub fn ensure_gcode_json(project_root: &Path) -> Result<(String, bool)>
Expand description

Ensure a gcode identity file exists. Non-destructive:

  • If project.json exists, reads its ID (gobby owns this project)
  • If gcode.json exists, reads its ID
  • If neither exists, creates gcode.json

Returns (project_id, was_created).