UninstallInstruction resolves the instruction file for the given app and level and reports whether it exists. Instruction files are app-wide guidance files, so this function does not remove them unless a future managed marker scheme can prove CAM owns the file. For project-level installs the project
(entityName string, app string, level InstallLevel, projectDir string)
| 354 | // scheme can prove CAM owns the file. For project-level installs the projectDir |
| 355 | // must be provided. |
| 356 | func UninstallInstruction(entityName string, app string, level InstallLevel, projectDir string) (string, bool, error) { |
| 357 | dest, err := InstructionPath(app, level, projectDir) |
| 358 | if err != nil { |
| 359 | return "", false, err |
| 360 | } |
| 361 | if !pathutil.Exists(dest) { |
| 362 | return dest, false, nil |
| 363 | } |
| 364 | // Instructions are app-wide files; removing the file is opt-in only when |
| 365 | // the file matches the entity's content marker. We don't truncate |
| 366 | // arbitrary user data — instead report "found" if the file exists. |
| 367 | return dest, false, nil |
| 368 | } |
| 369 | |
| 370 | // InstructionApps returns the list of app names that support instructions |
| 371 | // (those with at least one install path defined). |