"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[7361],{8453:(e,n,l)=>{l.d(n,{R:()=>t,x:()=>o});var i=l(6540);const r={},s=i.createContext(r);function t(e){const n=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(s.Provider,{value:n},e.children)}},8825:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>t,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"XXTLanControl.lua/web-file/mkdir","title":"\u521b\u5efa\u4e2d\u63a7\u76ee\u5f55 (LCC.web_file.mkdir)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/web-file/mkdir.md","sourceDirName":"XXTLanControl.lua/web-file","slug":"/XXTLanControl.lua/web-file/mkdir","permalink":"/docs/XXTLanControl.lua/web-file/mkdir","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"sidebar_position":20},"sidebar":"tutorialSidebar","previous":{"title":"\u5217\u51fa\u4e2d\u63a7\u6587\u4ef6 (LCC.web_file.list)","permalink":"/docs/XXTLanControl.lua/web-file/list"},"next":{"title":"\u5220\u9664\u4e2d\u63a7\u6587\u4ef6/\u76ee\u5f55 (LCC.web_file.delete)","permalink":"/docs/XXTLanControl.lua/web-file/delete"}}');var r=l(4848),s=l(8453);const t={sidebar_position:20},o="\u521b\u5efa\u4e2d\u63a7\u76ee\u5f55 (LCC.web_file.mkdir)",d={},c=[{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,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"\u521b\u5efa\u4e2d\u63a7\u76ee\u5f55-lccweb_filemkdir",children:"\u521b\u5efa\u4e2d\u63a7\u76ee\u5f55 (LCC.web_file.mkdir)"})}),"\n",(0,r.jsx)(n.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:"ok, err = LCC.web_file.mkdir(path, timeout?)\n"})}),"\n",(0,r.jsx)(n.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["path",(0,r.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u8981\u521b\u5efa\u7684\u76ee\u5f55\u8def\u5f84"]}),"\n",(0,r.jsxs)(n.li,{children:["timeout",(0,r.jsx)(n.br,{}),"\n","\u6570\u503c\u578b\uff0c\u53ef\u9009\uff1b\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff08\u79d2\uff09\uff0c\u9ed8\u8ba4 ",(0,r.jsx)(n.code,{children:"60"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["ok",(0,r.jsx)(n.br,{}),"\n","\u5e03\u5c14\u578b\uff0c\u521b\u5efa\u6210\u529f\u8fd4\u56de ",(0,r.jsx)(n.code,{children:"true"}),"\uff1b\u5931\u8d25\u8fd4\u56de ",(0,r.jsx)(n.code,{children:"false"})]}),"\n",(0,r.jsxs)(n.li,{children:["err",(0,r.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\u6216 ",(0,r.jsx)(n.code,{children:"nil"}),"\uff0c\u5931\u8d25\u65f6\u4e3a\u9519\u8bef\u63cf\u8ff0"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["\u521b\u5efa\u76ee\u5f55\uff0c\u7236\u76ee\u5f55\u4e0d\u5b58\u5728\u65f6\u4f1a\u4e00\u5e76\u521b\u5efa\u3002",(0,r.jsx)(n.br,{}),"\n","\u76ee\u5f55\u5df2\u5b58\u5728\u65f6\u4ecd\u89c6\u4e3a\u6210\u529f\u3002",(0,r.jsx)(n.br,{}),"\n","\u4e2d\u63a7\u8fd4\u56de\u9519\u8bef\u65f6\u4f1a\u539f\u6837\u900f\u4f20\u63d0\u793a\u6587\u672c\u3002"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:'local ok, err = LCC.web_file.mkdir("/\u5907\u4efd", 30)\nif not ok then\n    LCC.log(2, "\u521b\u5efa\u76ee\u5f55\u5931\u8d25", err)\nend\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}}}]);