#How to use `deleteTree()` properly? - *WARNING not with "/" *

1 messages · Page 1 of 1 (latest)

solemn tapir
#

Well, I guess you live and learn. I ran

some_dir.deleteTree("/");

Thinking it would go from that directory, but now my linux machine is half deleted... lol
I'm trying to delete all the files in the directory, not necessarily the directory itself, but couldn't see a clear way in the std lib that could accomplish that, like listing files in the Dir.

#

brb while I recover my system