Move And Overwrite (LCC.web_file.move_overwrite)
Signature
ok, err = LCC.web_file.move_overwrite(src, target, timeout?)
Parameters
- src
String. Source path. - target
String. Destination path. - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- ok
Boolean.trueon success,nilon failure. - err
String ornil. Error description when the move fails.
Notes
Wrapper for
web_file.movewithmode = "overwrite".
Existing targets are deleted before moving.
Example
local ok, err = LCC.web_file.move_overwrite("/logs/current.log", "/logs/history.log")
if not ok then
error(err)
end