{"id":1088570,"date":"2025-01-08T13:45:27","date_gmt":"2025-01-08T05:45:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1088570.html"},"modified":"2025-01-08T13:45:29","modified_gmt":"2025-01-08T05:45:29","slug":"python3%e5%a6%82%e4%bd%95%e5%a4%8d%e5%88%b6%e6%96%87%e4%bb%b6%e5%a4%b9-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1088570.html","title":{"rendered":"python3\u5982\u4f55\u590d\u5236\u6587\u4ef6\u5939"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24200953\/c622f184-f64e-4699-b952-58482932a899.webp\" alt=\"python3\u5982\u4f55\u590d\u5236\u6587\u4ef6\u5939\" \/><\/p>\n<p><p> <strong>\u8981\u590d\u5236\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u6807\u51c6\u5e93shutil\u4e2d\u7684copytree\u51fd\u6570\u3001\u4f7f\u7528os\u5e93\u8fdb\u884c\u624b\u52a8\u590d\u5236\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u7b49\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u8fd9\u91cc\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u4e00\u3001\u4f7f\u7528shutil\u5e93\u7684copytree\u51fd\u6570<\/strong><\/h2>\n<p><p>shutil\u5e93\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6587\u4ef6\u64cd\u4f5c\u5e93\uff0c\u5176\u4e2d\u7684copytree\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u9012\u5f52\u5730\u590d\u5236\u6574\u4e2a\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>1.1\u3001\u4f7f\u7528shutil.copytree<\/h3>\n<\/p>\n<p><p>shutil.copytree\u51fd\u6570\u662f\u6700\u7b80\u5355\u3001\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u5b83\u4f1a\u9012\u5f52\u5730\u590d\u5236\u76ee\u5f55\u6811\uff0c\u5305\u62ec\u6240\u6709\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>shutil.copytree(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>source<\/strong>: \u8fd9\u662f\u4f60\u60f3\u8981\u590d\u5236\u7684\u6e90\u6587\u4ef6\u5939\u8def\u5f84\u3002<\/li>\n<li><strong>destination<\/strong>: \u8fd9\u662f\u4f60\u5e0c\u671b\u590d\u5236\u5230\u7684\u76ee\u6807\u6587\u4ef6\u5939\u8def\u5f84\u3002<\/li>\n<\/ul>\n<p><h3>1.2\u3001\u5904\u7406\u5df2\u5b58\u5728\u7684\u76ee\u6807\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u76ee\u6807\u6587\u4ef6\u5939\u5df2\u7ecf\u5b58\u5728\uff0cshutil.copytree\u5c06\u4f1a\u62a5\u9519\u3002\u53ef\u4ee5\u901a\u8fc7\u63d0\u524d\u5220\u9664\u76ee\u6807\u6587\u4ef6\u5939\uff0c\u6216\u8005\u4f7f\u7528\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u51fd\u6570\u6765\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>import os<\/p>\n<p>def copy_folder(source, destination):<\/p>\n<p>    if os.path.exists(destination):<\/p>\n<p>        shutil.rmtree(destination)<\/p>\n<p>    shutil.copytree(source, destination)<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_folder(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>shutil.rmtree(destination)<\/strong>: \u8fd9\u4e2a\u65b9\u6cd5\u4f1a\u9012\u5f52\u5730\u5220\u9664\u76ee\u6807\u6587\u4ef6\u5939\uff0c\u786e\u4fdd\u76ee\u6807\u6587\u4ef6\u5939\u4e0d\u5b58\u5728\u3002<\/li>\n<\/ul>\n<h2><strong>\u4e8c\u3001\u4f7f\u7528os\u5e93\u8fdb\u884c\u624b\u52a8\u590d\u5236<\/strong><\/h2>\n<p><p>os\u5e93\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u7528\u4e8e\u64cd\u4f5c\u64cd\u4f5c\u7cfb\u7edf\u7684\u529f\u80fd\u3002\u53ef\u4ee5\u7ed3\u5408os\u5e93\u548cshutil\u5e93\u6765\u624b\u52a8\u590d\u5236\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>2.1\u3001\u4f7f\u7528os\u5e93\u904d\u5386\u76ee\u5f55\u6811<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528os\u5e93\u7684walk\u51fd\u6570\u6765\u904d\u5386\u76ee\u5f55\u6811\uff0c\u7136\u540e\u624b\u52a8\u590d\u5236\u6bcf\u4e2a\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import shutil<\/p>\n<p>def copy_folder(source, destination):<\/p>\n<p>    if not os.path.exists(destination):<\/p>\n<p>        os.makedirs(destination)<\/p>\n<p>    for root, dirs, files in os.walk(source):<\/p>\n<p>        for dir in dirs:<\/p>\n<p>            dest_dir = os.path.join(destination, os.path.relpath(os.path.join(root, dir), source))<\/p>\n<p>            if not os.path.exists(dest_dir):<\/p>\n<p>                os.makedirs(dest_dir)<\/p>\n<p>        for file in files:<\/p>\n<p>            source_file = os.path.join(root, file)<\/p>\n<p>            dest_file = os.path.join(destination, os.path.relpath(source_file, source))<\/p>\n<p>            shutil.copy2(source_file, dest_file)<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_folder(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>os.makedirs(destination)<\/strong>: \u5982\u679c\u76ee\u6807\u6587\u4ef6\u5939\u4e0d\u5b58\u5728\uff0c\u5219\u521b\u5efa\u5b83\u3002<\/li>\n<li><strong>os.walk(source)<\/strong>: \u904d\u5386\u6e90\u6587\u4ef6\u5939\u76ee\u5f55\u6811\u3002<\/li>\n<li><strong>os.path.relpath(path, start)<\/strong>: \u83b7\u53d6\u76f8\u5bf9\u8def\u5f84\uff0c\u7528\u4e8e\u751f\u6210\u76ee\u6807\u8def\u5f84\u3002<\/li>\n<li><strong>shutil.copy2(source_file, dest_file)<\/strong>: \u590d\u5236\u6587\u4ef6\uff0c\u5e76\u4fdd\u7559\u5143\u6570\u636e\uff08\u5982\u4fee\u6539\u65f6\u95f4\uff09\u3002<\/li>\n<\/ul>\n<h2><strong>\u4e09\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/strong><\/h2>\n<p><p>\u9664\u4e86Python\u6807\u51c6\u5e93\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6765\u590d\u5236\u6587\u4ef6\u5939\u3002\u4f8b\u5982\uff0cdistutils\u5e93\u4e5f\u53ef\u4ee5\u7528\u6765\u590d\u5236\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>3.1\u3001\u4f7f\u7528distutils\u5e93<\/h3>\n<\/p>\n<p><p>distutils\u5e93\u662fPython\u7684\u4e00\u4e2a\u6807\u51c6\u5e93\uff0c\u7528\u4e8e\u6784\u5efa\u548c\u5b89\u88c5Python\u6a21\u5757\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2adir_util\u6a21\u5757\uff0c\u5305\u542b\u4e86\u4e00\u4e2acopy_tree\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u6765\u9012\u5f52\u5730\u590d\u5236\u6574\u4e2a\u76ee\u5f55\u6811\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from distutils.dir_util import copy_tree<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_tree(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>copy_tree(source, destination)<\/strong>: \u9012\u5f52\u5730\u590d\u5236\u6e90\u6587\u4ef6\u5939\u5230\u76ee\u6807\u6587\u4ef6\u5939\u3002<\/li>\n<\/ul>\n<p><h3>3.2\u3001\u4f7f\u7528pathlib\u5e93<\/h3>\n<\/p>\n<p><p>pathlib\u662fPython 3.4\u5f15\u5165\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\u3002\u53ef\u4ee5\u7ed3\u5408pathlib\u548cshutil\u5e93\u6765\u590d\u5236\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>import shutil<\/p>\n<p>def copy_folder(source, destination):<\/p>\n<p>    source_path = Path(source)<\/p>\n<p>    destination_path = Path(destination)<\/p>\n<p>    if destination_path.exists():<\/p>\n<p>        shutil.rmtree(destination_path)<\/p>\n<p>    shutil.copytree(source_path, destination_path)<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_folder(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>Path(source)<\/strong>: \u521b\u5efa\u6e90\u8def\u5f84\u5bf9\u8c61\u3002<\/li>\n<li><strong>Path(destination)<\/strong>: \u521b\u5efa\u76ee\u6807\u8def\u5f84\u5bf9\u8c61\u3002<\/li>\n<li><strong>destination_path.exists()<\/strong>: \u68c0\u67e5\u76ee\u6807\u8def\u5f84\u662f\u5426\u5b58\u5728\u3002<\/li>\n<\/ul>\n<h2><strong>\u56db\u3001\u8de8\u5e73\u53f0\u6587\u4ef6\u5939\u590d\u5236<\/strong><\/h2>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u8de8\u5e73\u53f0\u590d\u5236\u6587\u4ef6\u5939\u3002\u53ef\u4ee5\u4f7f\u7528os\u5e93\u548cshutil\u5e93\u6765\u5b9e\u73b0\u8de8\u5e73\u53f0\u6587\u4ef6\u5939\u590d\u5236\u3002<\/p>\n<\/p>\n<p><h3>4.1\u3001\u8de8\u5e73\u53f0\u590d\u5236\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u7ed3\u5408os\u5e93\u548cshutil\u5e93\u6765\u5b9e\u73b0\u8de8\u5e73\u53f0\u6587\u4ef6\u5939\u590d\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import shutil<\/p>\n<p>def copy_folder(source, destination):<\/p>\n<p>    if not os.path.exists(destination):<\/p>\n<p>        os.makedirs(destination)<\/p>\n<p>    for root, dirs, files in os.walk(source):<\/p>\n<p>        for dir in dirs:<\/p>\n<p>            dest_dir = os.path.join(destination, os.path.relpath(os.path.join(root, dir), source))<\/p>\n<p>            if not os.path.exists(dest_dir):<\/p>\n<p>                os.makedirs(dest_dir)<\/p>\n<p>        for file in files:<\/p>\n<p>            source_file = os.path.join(root, file)<\/p>\n<p>            dest_file = os.path.join(destination, os.path.relpath(source_file, source))<\/p>\n<p>            shutil.copy2(source_file, dest_file)<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_folder(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>os.makedirs(destination)<\/strong>: \u5982\u679c\u76ee\u6807\u6587\u4ef6\u5939\u4e0d\u5b58\u5728\uff0c\u5219\u521b\u5efa\u5b83\u3002<\/li>\n<li><strong>os.walk(source)<\/strong>: \u904d\u5386\u6e90\u6587\u4ef6\u5939\u76ee\u5f55\u6811\u3002<\/li>\n<li><strong>os.path.relpath(path, start)<\/strong>: \u83b7\u53d6\u76f8\u5bf9\u8def\u5f84\uff0c\u7528\u4e8e\u751f\u6210\u76ee\u6807\u8def\u5f84\u3002<\/li>\n<li><strong>shutil.copy2(source_file, dest_file)<\/strong>: \u590d\u5236\u6587\u4ef6\uff0c\u5e76\u4fdd\u7559\u5143\u6570\u636e\uff08\u5982\u4fee\u6539\u65f6\u95f4\uff09\u3002<\/li>\n<\/ul>\n<p><h3>4.2\u3001\u5904\u7406\u6587\u4ef6\u6743\u9650<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5904\u7406\u6587\u4ef6\u6743\u9650\uff0c\u53ef\u4ee5\u4f7f\u7528shutil.copystat\u6765\u590d\u5236\u6587\u4ef6\u6743\u9650\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import shutil<\/p>\n<p>def copy_folder(source, destination):<\/p>\n<p>    if not os.path.exists(destination):<\/p>\n<p>        os.makedirs(destination)<\/p>\n<p>    for root, dirs, files in os.walk(source):<\/p>\n<p>        for dir in dirs:<\/p>\n<p>            dest_dir = os.path.join(destination, os.path.relpath(os.path.join(root, dir), source))<\/p>\n<p>            if not os.path.exists(dest_dir):<\/p>\n<p>                os.makedirs(dest_dir)<\/p>\n<p>        for file in files:<\/p>\n<p>            source_file = os.path.join(root, file)<\/p>\n<p>            dest_file = os.path.join(destination, os.path.relpath(source_file, source))<\/p>\n<p>            shutil.copy2(source_file, dest_file)<\/p>\n<p>            shutil.copystat(source_file, dest_file)<\/p>\n<p>source = &#39;path\/to\/source\/folder&#39;<\/p>\n<p>destination = &#39;path\/to\/destination\/folder&#39;<\/p>\n<p>copy_folder(source, destination)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>shutil.copystat(source_file, dest_file)<\/strong>: \u590d\u5236\u6587\u4ef6\u6743\u9650\u3002<\/li>\n<\/ul>\n<h2><strong>\u4e94\u3001\u603b\u7ed3<\/strong><\/h2>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u5b9e\u73b0\u6587\u4ef6\u5939\u7684\u590d\u5236\u3002shutil\u5e93\u7684copytree\u51fd\u6570\u662f\u6700\u7b80\u5355\u3001\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\uff1bos\u5e93\u548cshutil\u5e93\u7ed3\u5408\u4f7f\u7528\u53ef\u4ee5\u5b9e\u73b0\u66f4\u7075\u6d3b\u7684\u6587\u4ef6\u5939\u590d\u5236\uff1bdistutils\u5e93\u548cpathlib\u5e93\u4e5f\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u6587\u4ef6\u5939\u590d\u5236\u65b9\u6cd5\uff1b\u8de8\u5e73\u53f0\u6587\u4ef6\u5939\u590d\u5236\u53ef\u4ee5\u7ed3\u5408os\u5e93\u548cshutil\u5e93\u6765\u5b9e\u73b0\uff0c\u5e76\u5904\u7406\u6587\u4ef6\u6743\u9650\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u5b9e\u73b0\u6587\u4ef6\u5939\u7684\u590d\u5236\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python3\u4e2d\u590d\u5236\u6587\u4ef6\u5939\u53ca\u5176\u5185\u5bb9\uff1f<\/strong><br \/>\u5728Python3\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>shutil<\/code>\u6a21\u5757\u6765\u590d\u5236\u6587\u4ef6\u5939\u3002\u8be5\u6a21\u5757\u63d0\u4f9b\u4e86<code>shutil.copytree()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u5c06\u6574\u4e2a\u6587\u4ef6\u5939\u53ca\u5176\u5185\u5bb9\u590d\u5236\u5230\u65b0\u7684\u4f4d\u7f6e\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">import shutil\n\nshutil.copytree(&#39;\u6e90\u6587\u4ef6\u5939\u8def\u5f84&#39;, &#39;\u76ee\u6807\u6587\u4ef6\u5939\u8def\u5f84&#39;)\n<\/code><\/pre>\n<p><strong>\u590d\u5236\u6587\u4ef6\u5939\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u4f7f\u7528<code>shutil.copytree()<\/code>\u65f6\uff0c\u786e\u4fdd\u76ee\u6807\u6587\u4ef6\u5939\u8def\u5f84\u4e0d\u5b58\u5728\u3002\u5982\u679c\u76ee\u6807\u6587\u4ef6\u5939\u5df2\u5b58\u5728\uff0c\u51fd\u6570\u4f1a\u629b\u51fa<code>FileExistsError<\/code>\u5f02\u5e38\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u4f7f\u7528<code>ignore<\/code>\u53c2\u6570\u6765\u8df3\u8fc7\u67d0\u4e9b\u7279\u5b9a\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7684\u590d\u5236\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u590d\u5236\u5927\u6587\u4ef6\u5939\u65f6\u7684\u6027\u80fd\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u590d\u5236\u5927\u578b\u6587\u4ef6\u5939\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u591a\u7ebf\u7a0b\u6216\u5f02\u6b65\u64cd\u4f5c\u6765\u63d0\u9ad8\u6027\u80fd\u3002\u867d\u7136<code>shutil.copytree()<\/code>\u662f\u7b80\u5355\u6613\u7528\u7684\uff0c\u4f46\u5bf9\u4e8e\u6781\u5927\u7684\u6587\u4ef6\u5939\uff0c\u53ef\u80fd\u9700\u8981\u81ea\u5b9a\u4e49\u5b9e\u73b0\u4ee5\u4fbf\u8fdb\u884c\u66f4\u9ad8\u6548\u7684\u5904\u7406\uff0c\u6bd4\u5982\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u5206\u6279\u6b21\u590d\u5236\u6587\u4ef6\uff0c\u6216\u4f7f\u7528\u591a\u7ebf\u7a0b\u5e93\u5982<code>concurrent.futures<\/code>\u6765\u52a0\u901f\u590d\u5236\u8fc7\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u590d\u5236\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u6807\u51c6\u5e93shutil\u4e2d\u7684copytree\u51fd\u6570\u3001\u4f7f\u7528os\u5e93\u8fdb\u884c\u624b\u52a8\u590d\u5236\u3001\u5229\u7528\u7b2c [&hellip;]","protected":false},"author":3,"featured_media":1088578,"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\/1088570"}],"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=1088570"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1088570\/revisions"}],"predecessor-version":[{"id":1088580,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1088570\/revisions\/1088580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1088578"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1088570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1088570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1088570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}