複製並合併缺失項 (LCC.web_file.copy_merge)
聲明
ok, err = LCC.web_file.copy_merge(src, target, timeout?)
參數
- src
字串型,來源路徑 - target
字串型,目標路徑 - timeout
數值型,可選;請求逾時時間(秒),預設60
回傳值
- ok
布林值,成功傳回true,失敗傳回nil - err
字串型或nil,失敗時的錯誤描述
說明
web_file.copy的便捷封裝,等效於mode = "merge"。
僅在目標缺少對應檔案或目錄時才複製,並保留既有檔案。
範例
local ok, err = LCC.web_file.copy_merge("/範本", "/部署/範本")
if not ok then
error(err)
end