How to remove a directory recursively in Rust, deleting empty directories with Unix permissions of 000 as well? These permissions are read as "no reading, writing or executing is allowed by any user".
I've previously created the directory like this:
mkdir -p dir/trap
chmod 000 dir/trap
I've tried this method:
std::fs::remove_dir_all("dir").unwrap();
It fails with "Permission denied" however. Are there any other solutions that still remove such directory, like rm -rf would?