"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[3624],{3596:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>d});const l=JSON.parse('{"id":"XXTLanControl.lua/web-file/copy_merge","title":"\u62f7\u8d1d\u5e76\u5408\u5e76\u7f3a\u5931\u9879 (LCC.web_file.copy_merge)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/web-file/copy_merge.md","sourceDirName":"XXTLanControl.lua/web-file","slug":"/XXTLanControl.lua/web-file/copy_merge","permalink":"/docs/XXTLanControl.lua/web-file/copy_merge","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":270,"frontMatter":{"sidebar_position":270},"sidebar":"tutorialSidebar","previous":{"title":"\u62f7\u8d1d\u5e76\u8986\u76d6\u76ee\u6807 (LCC.web_file.copy_overwrite)","permalink":"/docs/XXTLanControl.lua/web-file/copy_overwrite"},"next":{"title":"\u62f7\u8d1d\u5e76\u5f3a\u5236\u8986\u76d6\u5408\u5e76 (LCC.web_file.copy_overwrite_merge)","permalink":"/docs/XXTLanControl.lua/web-file/copy_overwrite_merge"}}');var o=r(4848),i=r(8453);const s={sidebar_position:270},c="\u62f7\u8d1d\u5e76\u5408\u5e76\u7f3a\u5931\u9879 (LCC.web_file.copy_merge)",t={},d=[{value:"\u58f0\u660e",id:"\u58f0\u660e",level:2},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:2},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:2},{value:"\u8bf4\u660e",id:"\u8bf4\u660e",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2}];function a(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"\u62f7\u8d1d\u5e76\u5408\u5e76\u7f3a\u5931\u9879-lccweb_filecopy_merge",children:"\u62f7\u8d1d\u5e76\u5408\u5e76\u7f3a\u5931\u9879 (LCC.web_file.copy_merge)"})}),"\n",(0,o.jsx)(n.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-lua",children:"ok, err = LCC.web_file.copy_merge(src, target, timeout?)\n"})}),"\n",(0,o.jsx)(n.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["src",(0,o.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u6e90\u8def\u5f84"]}),"\n",(0,o.jsxs)(n.li,{children:["target",(0,o.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u76ee\u6807\u8def\u5f84"]}),"\n",(0,o.jsxs)(n.li,{children:["timeout",(0,o.jsx)(n.br,{}),"\n","\u6570\u503c\u578b\uff0c\u53ef\u9009\uff1b\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff08\u79d2\uff09\uff0c\u9ed8\u8ba4 ",(0,o.jsx)(n.code,{children:"60"})]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["ok",(0,o.jsx)(n.br,{}),"\n","\u5e03\u5c14\u578b\uff0c\u6210\u529f\u8fd4\u56de ",(0,o.jsx)(n.code,{children:"true"}),"\uff0c\u5931\u8d25\u8fd4\u56de ",(0,o.jsx)(n.code,{children:"nil"})]}),"\n",(0,o.jsxs)(n.li,{children:["err",(0,o.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\u6216 ",(0,o.jsx)(n.code,{children:"nil"}),"\uff0c\u5931\u8d25\u65f6\u7684\u9519\u8bef\u63cf\u8ff0"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"web_file.copy"})," \u7684\u4fbf\u6377\u5c01\u88c5\uff0c\u7b49\u6548\u4e8e ",(0,o.jsx)(n.code,{children:'mode = "merge"'}),"\u3002",(0,o.jsx)(n.br,{}),"\n","\u4ec5\u5728\u76ee\u6807\u7f3a\u5931\u76f8\u5e94\u6587\u4ef6\u6216\u76ee\u5f55\u65f6\u624d\u590d\u5236\uff0c\u4fdd\u7559\u65e2\u6709\u6587\u4ef6\u3002"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-lua",children:'local ok, err = LCC.web_file.copy_merge("/\u6a21\u677f", "/\u90e8\u7f72/\u6a21\u677f")\nif not ok then\n    error(err)\nend\n'})})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>c});var l=r(6540);const o={},i=l.createContext(o);function s(e){const n=l.useContext(i);return l.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),l.createElement(i.Provider,{value:n},e.children)}}}]);