{"id":1064689,"date":"2024-12-31T16:11:15","date_gmt":"2024-12-31T08:11:15","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1064689.html"},"modified":"2024-12-31T16:11:17","modified_gmt":"2024-12-31T08:11:17","slug":"python%e4%b8%8b%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a4%e6%96%87%e4%bb%b6%e5%a4%b9%e5%90%8d","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1064689.html","title":{"rendered":"python\u4e0b\u5982\u4f55\u5220\u9664\u6587\u4ef6\u5939\u540d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/1a07cb4a-1a3c-4e85-aeb5-e351b71d7076.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u4e0b\u5982\u4f55\u5220\u9664\u6587\u4ef6\u5939\u540d\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u5220\u9664\u6587\u4ef6\u5939\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528os\u6a21\u5757\u3001shutil\u6a21\u5757\u3001pathlib\u6a21\u5757\u3002<\/strong> \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u5f0f\u662f\u901a\u8fc7os\u6a21\u5757\u7684rmdir\u51fd\u6570\u6765\u5220\u9664\u7a7a\u6587\u4ef6\u5939\uff0cshutil\u6a21\u5757\u7684rmtree\u51fd\u6570\u53ef\u4ee5\u5220\u9664\u975e\u7a7a\u6587\u4ef6\u5939\uff0cpathlib\u6a21\u5757\u7684rmdir\u51fd\u6570\u4e5f\u53ef\u4ee5\u5220\u9664\u7a7a\u6587\u4ef6\u5939\u3002<strong>\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e00\u3001OS\u6a21\u5757<\/h3>\n<\/p>\n<p><p>Python\u7684os\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u63a5\u53e3\u51fd\u6570\uff0c\u5305\u62ec\u5220\u9664\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3002\u8981\u5220\u9664\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528os.rmdir()\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u53ea\u80fd\u5220\u9664\u7a7a\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528os.rmdir()\u5220\u9664\u7a7a\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u6307\u5b9a\u8981\u5220\u9664\u7684\u6587\u4ef6\u5939\u8def\u5f84<\/strong><\/h2>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<h2><strong>\u5220\u9664\u6587\u4ef6\u5939<\/strong><\/h2>\n<p>try:<\/p>\n<p>    os.rmdir(folder_path)<\/p>\n<p>    print(f&quot;Successfully deleted the folder: {folder_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528os.remove()\u5220\u9664\u6587\u4ef6<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u6307\u5b9a\u8981\u5220\u9664\u7684\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = &#39;path_to_your_file&#39;<\/p>\n<h2><strong>\u5220\u9664\u6587\u4ef6<\/strong><\/h2>\n<p>try:<\/p>\n<p>    os.remove(file_path)<\/p>\n<p>    print(f&quot;Successfully deleted the file: {file_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {file_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001Shutil\u6a21\u5757<\/h3>\n<\/p>\n<p><p>Shutil\u6a21\u5757\u662fPython\u7684\u9ad8\u7ea7\u6587\u4ef6\u64cd\u4f5c\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u9ad8\u7ea7\u64cd\u4f5c\u529f\u80fd\u3002\u8981\u5220\u9664\u975e\u7a7a\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528shutil.rmtree()\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528shutil.rmtree()\u5220\u9664\u975e\u7a7a\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<h2><strong>\u6307\u5b9a\u8981\u5220\u9664\u7684\u6587\u4ef6\u5939\u8def\u5f84<\/strong><\/h2>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<h2><strong>\u5220\u9664\u6587\u4ef6\u5939\u53ca\u5176\u5185\u5bb9<\/strong><\/h2>\n<p>try:<\/p>\n<p>    shutil.rmtree(folder_path)<\/p>\n<p>    print(f&quot;Successfully deleted the folder and its contents: {folder_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001Pathlib\u6a21\u5757<\/h3>\n<\/p>\n<p><p>Pathlib\u6a21\u5757\u662fPython 3.4\u5f15\u5165\u7684\u6a21\u5757\uff0c\u7528\u4e8e\u9762\u5411\u5bf9\u8c61\u5730\u5904\u7406\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u8def\u5f84\u3002Pathlib\u7684Path\u5bf9\u8c61\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65b9\u4fbf\u7684\u65b9\u6cd5\u6765\u8fdb\u884c\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528Pathlib\u5220\u9664\u7a7a\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u6307\u5b9a\u8981\u5220\u9664\u7684\u6587\u4ef6\u5939\u8def\u5f84<\/strong><\/h2>\n<p>folder_path = Path(&#39;path_to_your_folder&#39;)<\/p>\n<h2><strong>\u5220\u9664\u6587\u4ef6\u5939<\/strong><\/h2>\n<p>try:<\/p>\n<p>    folder_path.rmdir()<\/p>\n<p>    print(f&quot;Successfully deleted the folder: {folder_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528Pathlib\u5220\u9664\u6587\u4ef6<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u6307\u5b9a\u8981\u5220\u9664\u7684\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = Path(&#39;path_to_your_file&#39;)<\/p>\n<h2><strong>\u5220\u9664\u6587\u4ef6<\/strong><\/h2>\n<p>try:<\/p>\n<p>    file_path.unlink()<\/p>\n<p>    print(f&quot;Successfully deleted the file: {file_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {file_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5220\u9664\u6587\u4ef6\u5939\u524d\u7684\u5b89\u5168\u68c0\u67e5<\/h3>\n<\/p>\n<p><p>\u5728\u5220\u9664\u6587\u4ef6\u5939\u4e4b\u524d\uff0c\u6700\u597d\u8fdb\u884c\u4e00\u4e9b\u5b89\u5168\u68c0\u67e5\uff0c\u786e\u4fdd\u4e0d\u4f1a\u8bef\u5220\u91cd\u8981\u6587\u4ef6\u5939\u3002\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\u3001\u662f\u5426\u4e3a\u7a7a\u7b49\u6761\u4ef6\u6765\u8fdb\u884c\u5b89\u5168\u5220\u9664\u3002<\/p>\n<\/p>\n<p><h4>1. \u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<p>if os.path.exists(folder_path):<\/p>\n<p>    try:<\/p>\n<p>        os.rmdir(folder_path)<\/p>\n<p>        print(f&quot;Successfully deleted the folder: {folder_path}&quot;)<\/p>\n<p>    except OSError as e:<\/p>\n<p>        print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;Error: {folder_path} does not exist&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u4e3a\u7a7a<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<p>if os.path.exists(folder_path):<\/p>\n<p>    if not os.listdir(folder_path):<\/p>\n<p>        try:<\/p>\n<p>            os.rmdir(folder_path)<\/p>\n<p>            print(f&quot;Successfully deleted the empty folder: {folder_path}&quot;)<\/p>\n<p>        except OSError as e:<\/p>\n<p>            print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Error: {folder_path} is not empty&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;Error: {folder_path} does not exist&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u9519\u8bef\u5904\u7406\u548c\u65e5\u5fd7\u8bb0\u5f55<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u5220\u9664\u6587\u4ef6\u5939\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\uff0c\u56e0\u6b64\u9700\u8981\u8fdb\u884c\u9519\u8bef\u5904\u7406\u548c\u65e5\u5fd7\u8bb0\u5f55\uff0c\u4ee5\u4fbf\u4e8e\u8c03\u8bd5\u548c\u7ef4\u62a4\u3002<\/p>\n<\/p>\n<p><h4>1. \u9519\u8bef\u5904\u7406<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<p>try:<\/p>\n<p>    os.rmdir(folder_path)<\/p>\n<p>    print(f&quot;Successfully deleted the folder: {folder_path}&quot;)<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    print(f&quot;Error: {folder_path} does not exist&quot;)<\/p>\n<p>except PermissionError:<\/p>\n<p>    print(f&quot;Error: Permission denied to delete {folder_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    print(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u65e5\u5fd7\u8bb0\u5f55<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import logging<\/p>\n<h2><strong>\u8bbe\u7f6e\u65e5\u5fd7\u8bb0\u5f55<\/strong><\/h2>\n<p>logging.basicConfig(filename=&#39;delete_folder.log&#39;, level=logging.INFO, format=&#39;%(asctime)s - %(levelname)s - %(message)s&#39;)<\/p>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<p>try:<\/p>\n<p>    os.rmdir(folder_path)<\/p>\n<p>    logging.info(f&quot;Successfully deleted the folder: {folder_path}&quot;)<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    logging.error(f&quot;Error: {folder_path} does not exist&quot;)<\/p>\n<p>except PermissionError:<\/p>\n<p>    logging.error(f&quot;Error: Permission denied to delete {folder_path}&quot;)<\/p>\n<p>except OSError as e:<\/p>\n<p>    logging.error(f&quot;Error: {folder_path} : {e.strerror}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u9012\u5f52\u5220\u9664\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u9012\u5f52\u5220\u9664\u6587\u4ef6\u5939\u53ca\u5176\u6240\u6709\u5185\u5bb9\uff0c\u53ef\u4ee5\u4f7f\u7528\u9012\u5f52\u51fd\u6570\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h4>1. \u9012\u5f52\u5220\u9664\u6587\u4ef6\u5939\u7684\u5b9e\u73b0<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def delete_folder_recursively(folder_path):<\/p>\n<p>    if os.path.exists(folder_path):<\/p>\n<p>        if os.path.isdir(folder_path):<\/p>\n<p>            for item in os.listdir(folder_path):<\/p>\n<p>                item_path = os.path.join(folder_path, item)<\/p>\n<p>                if os.path.isdir(item_path):<\/p>\n<p>                    delete_folder_recursively(item_path)<\/p>\n<p>                else:<\/p>\n<p>                    os.remove(item_path)<\/p>\n<p>            os.rmdir(folder_path)<\/p>\n<p>            print(f&quot;Successfully deleted the folder and its contents: {folder_path}&quot;)<\/p>\n<p>        else:<\/p>\n<p>            print(f&quot;Error: {folder_path} is not a directory&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Error: {folder_path} does not exist&quot;)<\/p>\n<p>folder_path = &#39;path_to_your_folder&#39;<\/p>\n<p>delete_folder_recursively(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5c0f\u7ed3<\/h3>\n<\/p>\n<p><p>\u5220\u9664\u6587\u4ef6\u5939\u5728Python\u4e2d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528os\u6a21\u5757\u3001shutil\u6a21\u5757\u548cpathlib\u6a21\u5757\u3002<strong>\u5728\u5220\u9664\u6587\u4ef6\u5939\u4e4b\u524d\uff0c\u8fdb\u884c\u5b89\u5168\u68c0\u67e5\u548c\u9519\u8bef\u5904\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u8bef\u5220\u6587\u4ef6\u5939\u548c\u5176\u4ed6\u6f5c\u5728\u95ee\u9898\u3002<\/strong> \u901a\u8fc7\u9012\u5f52\u5220\u9664\u6587\u4ef6\u5939\uff0c\u6211\u4eec\u53ef\u4ee5\u65b9\u4fbf\u5730\u5220\u9664\u6587\u4ef6\u5939\u53ca\u5176\u6240\u6709\u5185\u5bb9\u3002\u5e0c\u671b\u672c\u6587\u63d0\u4f9b\u7684\u65b9\u6cd5\u548c\u793a\u4f8b\u4ee3\u7801\u80fd\u591f\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u548c\u5b9e\u73b0Python\u4e2d\u7684\u6587\u4ef6\u5939\u5220\u9664\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u5168\u5730\u5220\u9664\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u5220\u9664\u6587\u4ef6\u5939\u65f6\uff0c\u63a8\u8350\u4f7f\u7528<code>shutil<\/code>\u6a21\u5757\u7684<code>rmtree()<\/code>\u65b9\u6cd5\u3002\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u9012\u5f52\u5730\u5220\u9664\u6587\u4ef6\u5939\u53ca\u5176\u6240\u6709\u5185\u5bb9\u3002\u4f7f\u7528\u524d\u8bf7\u786e\u4fdd\u5907\u4efd\u91cd\u8981\u6570\u636e\uff0c\u4ee5\u907f\u514d\u8bef\u5220\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import shutil\n\nshutil.rmtree(&#39;path\/to\/directory&#39;)\n<\/code><\/pre>\n<p>\u786e\u4fdd\u5c06<code>&#39;path\/to\/directory&#39;<\/code>\u66ff\u6362\u4e3a\u60a8\u60f3\u8981\u5220\u9664\u7684\u6587\u4ef6\u5939\u8def\u5f84\u3002<\/p>\n<p><strong>\u5728\u5220\u9664\u6587\u4ef6\u5939\u524d\uff0c\u5982\u4f55\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\uff1f<\/strong><br \/>\u5728\u5220\u9664\u6587\u4ef6\u5939\u4e4b\u524d\uff0c\u68c0\u67e5\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\u662f\u4e2a\u597d\u4e60\u60ef\u3002\u53ef\u4ee5\u4f7f\u7528<code>os.path<\/code>\u6a21\u5757\u4e2d\u7684<code>exists()<\/code>\u65b9\u6cd5\u6765\u5224\u65ad\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\n\nfolder_path = &#39;path\/to\/directory&#39;\nif os.path.exists(folder_path):\n    shutil.rmtree(folder_path)\nelse:\n    print(&quot;\u6587\u4ef6\u5939\u4e0d\u5b58\u5728&quot;)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u907f\u514d\u56e0\u8def\u5f84\u9519\u8bef\u800c\u5bfc\u81f4\u7684\u5f02\u5e38\u3002<\/p>\n<p><strong>\u5220\u9664\u6587\u4ef6\u5939\u540e\u5982\u4f55\u786e\u4fdd\u5176\u5185\u5bb9\u88ab\u5f7b\u5e95\u6e05\u9664\uff1f<\/strong><br \/>\u5728\u5220\u9664\u6587\u4ef6\u5939\u540e\uff0c\u867d\u7136\u64cd\u4f5c\u7cfb\u7edf\u4f1a\u5c06\u5176\u6807\u8bb0\u4e3a\u53ef\u7528\u7a7a\u95f4\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6570\u636e\u53ef\u80fd\u4ecd\u53ef\u6062\u590d\u3002\u5982\u679c\u9700\u8981\u786e\u4fdd\u6570\u636e\u88ab\u5f7b\u5e95\u6e05\u9664\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u6587\u4ef6\u64e6\u9664\u5de5\u5177\u6216Python\u4e2d\u7684<code>os<\/code>\u6a21\u5757\u7ed3\u5408\u968f\u673a\u6570\u636e\u8986\u76d6\u6765\u5b9e\u73b0\u3002\u786e\u4fdd\u5728\u6267\u884c\u6b64\u64cd\u4f5c\u524d\u4e86\u89e3\u6587\u4ef6\u6062\u590d\u7684\u98ce\u9669\u548c\u76f8\u5173\u6cd5\u5f8b\u3002<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u5728Python\u4e2d\u6709\u6548\u3001\u5b89\u5168\u5730\u5220\u9664\u6587\u4ef6\u5939\u53ca\u5176\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5220\u9664\u6587\u4ef6\u5939\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528os\u6a21\u5757\u3001shutil\u6a21\u5757\u3001pathlib\u6a21\u5757\u3002 \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u5f0f\u662f\u901a [&hellip;]","protected":false},"author":3,"featured_media":1064701,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1064689"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1064689"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1064689\/revisions"}],"predecessor-version":[{"id":1064705,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1064689\/revisions\/1064705"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1064701"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1064689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1064689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1064689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}