Delete Files Or Directories (LCC.web_file.delete)
Signature
ok, err = LCC.web_file.delete(path, force?, timeout?)
Parameters
- path
String. File or directory path to remove. - force
Boolean, optional. Set totrueto delete non-empty directories; defaultfalse. - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- ok
Boolean.trueon success,falseon failure. - err
String ornil. Error description; when the target is missing it's'not found'.
Notes
Deletes the specified file or directory.
Deleting a non-empty directory withoutforcefails.
Missing targets returnfalse, 'not found'.
Example
local ok, err = LCC.web_file.delete("/reports/temp.txt")
if not ok then
LCC.log(3, "Delete failed", err)
end