I think you mean you deleted your files using unlink(), rather than unlist(), which should be benign.
R provides file management capabilities similar to using a terminal or shell directly, so this is why a command can delete your files and directories (the recursive = TRUE part does this).
I don't know what OS you are on, but you should check for the usual OS utilities to restore deleted files or else check your back-up system.