"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[8986],{8453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var n=r(6540);const o={},i=n.createContext(o);function s(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:t},e.children)}},9940:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"XXTLanControl.lua/web-file/README","title":"Shared Files","description":"LCC.web_file corresponds to the Resource Directory in the file manager.","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/web-file/README.md","sourceDirName":"XXTLanControl.lua/web-file","slug":"/XXTLanControl.lua/web-file/","permalink":"/docs/en/XXTLanControl.lua/web-file/","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Send Controller Logs (LCC.log)","permalink":"/docs/en/XXTLanControl.lua/core/log"},"next":{"title":"List Files On The Controller (LCC.web_file.list)","permalink":"/docs/en/XXTLanControl.lua/web-file/list"}}');var o=r(4848),i=r(8453);const s={sidebar_position:2},l="Shared Files",a={},c=[{value:"Import the Module",id:"import-the-module",level:2},{value:"Before You Start",id:"before-you-start",level:2}];function d(e){const t={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"shared-files",children:"Shared Files"})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"LCC.web_file"})," corresponds to the ",(0,o.jsx)(t.code,{children:"Resource Directory"})," in the file manager."]}),"\n",(0,o.jsxs)(t.p,{children:["It is useful for shared resources, text file reading and writing, file moves, and checksum-related operations. If you need to work with the ",(0,o.jsx)(t.code,{children:"Script Directory"})," or ",(0,o.jsx)(t.code,{children:"Reports Directory"}),", the file management UI is usually the better choice."]}),"\n",(0,o.jsx)(t.h2,{id:"import-the-module",children:"Import the Module"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-lua",children:'local LCC = require("XXTLanControl")\n'})}),"\n",(0,o.jsx)(t.h2,{id:"before-you-start",children:"Before You Start"}),"\n",(0,o.jsxs)(t.p,{children:["Before using any helper, make sure you either call ",(0,o.jsx)(t.code,{children:"LCC.set_api_url()"})," or start the script from the control center, and always complete initialization with ",(0,o.jsx)(t.code,{children:"LCC.connect()"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}}}]);