delete

Delete a folder or file if exist

Use sub argument to delete folder with files

Arguments
Name Type Description Required
path string folder or file path yes
sub bool set true for removing subFiles too, if folder has subFiles and this set to false , you will receive error yes

Output : bool

Static or normal : Static

Examples :

tools::delete('xfolder/yfolder');
tools::delete('xfile.zip');