"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[4804],{7103:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>t,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"XXTLanControl.lua/web-file/move_overwrite_merge","title":"\u79fb\u52a8\u5e76\u5f3a\u5236\u8986\u76d6\u5408\u5e76 (LCC.web_file.move_overwrite_merge)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/web-file/move_overwrite_merge.md","sourceDirName":"XXTLanControl.lua/web-file","slug":"/XXTLanControl.lua/web-file/move_overwrite_merge","permalink":"/docs/XXTLanControl.lua/web-file/move_overwrite_merge","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":320,"frontMatter":{"sidebar_position":320},"sidebar":"tutorialSidebar","previous":{"title":"\u79fb\u52a8\u5e76\u5408\u5e76\u7f3a\u5931\u9879 (LCC.web_file.move_merge)","permalink":"/docs/XXTLanControl.lua/web-file/move_merge"},"next":{"title":"\u4eba\u5de5\u8f85\u52a9","permalink":"/docs/XXTLanControl.lua/assist/"}}');var i=n(4848),l=n(8453);const t={sidebar_position:320},s="\u79fb\u52a8\u5e76\u5f3a\u5236\u8986\u76d6\u5408\u5e76 (LCC.web_file.move_overwrite_merge)",c={},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 r={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"\u79fb\u52a8\u5e76\u5f3a\u5236\u8986\u76d6\u5408\u5e76-lccweb_filemove_overwrite_merge",children:"\u79fb\u52a8\u5e76\u5f3a\u5236\u8986\u76d6\u5408\u5e76 (LCC.web_file.move_overwrite_merge)"})}),"\n",(0,i.jsx)(r.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:"ok, err = LCC.web_file.move_overwrite_merge(src, target, timeout?)\n"})}),"\n",(0,i.jsx)(r.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:["src",(0,i.jsx)(r.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u6e90\u8def\u5f84"]}),"\n",(0,i.jsxs)(r.li,{children:["target",(0,i.jsx)(r.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u76ee\u6807\u8def\u5f84"]}),"\n",(0,i.jsxs)(r.li,{children:["timeout",(0,i.jsx)(r.br,{}),"\n","\u6570\u503c\u578b\uff0c\u53ef\u9009\uff1b\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff08\u79d2\uff09\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(r.code,{children:"60"})]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:["ok",(0,i.jsx)(r.br,{}),"\n","\u5e03\u5c14\u578b\uff0c\u6210\u529f\u8fd4\u56de ",(0,i.jsx)(r.code,{children:"true"}),"\uff0c\u5931\u8d25\u8fd4\u56de ",(0,i.jsx)(r.code,{children:"nil"})]}),"\n",(0,i.jsxs)(r.li,{children:["err",(0,i.jsx)(r.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\u6216 ",(0,i.jsx)(r.code,{children:"nil"}),"\uff0c\u5931\u8d25\u65f6\u7684\u9519\u8bef\u63cf\u8ff0"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,i.jsxs)(r.blockquote,{children:["\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.code,{children:"web_file.move"})," \u7684\u4fbf\u6377\u5c01\u88c5\uff0c\u7b49\u6548\u4e8e ",(0,i.jsx)(r.code,{children:'mode = "overwrite-merge"'}),"\u3002",(0,i.jsx)(r.br,{}),"\n","\u4f1a\u8986\u76d6\u76ee\u6807\u4e2d\u540c\u540d\u6587\u4ef6\uff0c\u518d\u8865\u9f50\u5176\u4f59\u7f3a\u5931\u9879\u3002"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:'local ok, err = LCC.web_file.move_overwrite_merge("/\u8d44\u6e90/temp", "/\u8d44\u6e90/\u6b63\u5f0f")\nif not ok then\n    error(err)\nend\n'})})]})}function u(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>s});var o=n(6540);const i={},l=o.createContext(i);function t(e){const r=o.useContext(l);return o.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),o.createElement(l.Provider,{value:r},e.children)}}}]);