{
  "id": "go/os-rename-file-cross-device",
  "signature": "error: rename /old/path /new/path: invalid cross-device link",
  "signature_zh": "错误：重命名 /旧路径 /新路径：无效的跨设备链接",
  "regex": "error:\\ rename\\ /old/path\\ /new/path:\\ invalid\\ cross\\-device\\ link",
  "domain": "go",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Attempting to rename a file across different file systems or mount points, which is not supported by os.Rename.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试在不同文件系统或挂载点之间重命名文件，os.Rename不支持此操作。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using os.Rename with fallback to copy+delete only on error",
      "why_fails": "Does not handle atomicity; may leave partial files.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement copy-then-delete strategy with error handling",
      "success_rate": 0.9,
      "how": "src, _ := os.Open(oldPath)\ndst, _ := os.Create(newPath)\nio.Copy(dst, src)\nsrc.Close()\ndst.Close()\nos.Remove(oldPath)",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}