{
  "id": "go/os-remove-directory-not-empty",
  "signature": "remove /path/to/dir: directory not empty",
  "signature_zh": "删除 /path/to/dir: 目录不为空",
  "regex": "remove\\ /path/to/dir:\\ directory\\ not\\ empty",
  "domain": "go",
  "category": "io_error",
  "subcategory": null,
  "root_cause": "Attempting to remove a directory that still contains files or subdirectories using os.Remove() or os.RemoveAll() incorrectly.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 os.Remove() 或 os.RemoveAll() 尝试删除仍然包含文件或子目录的目录。",
  "versions": [
    {
      "version": "1.14",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.16",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "os.RemoveAll() should work, but if it fails, it's due to permission issues or race conditions.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The first call fails, and the second call will also fail.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Use os.RemoveAll() for recursive deletion.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "List directory contents and remove files first, then the directory.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}