I am writing software that has an option to delete all files is a user-specified directory. This is the usual case for software. For example, cpp compiler has an option to delete all previously generated binaries.
My program accepts any path from the user for removal, which could lead to them accidentally removing their home directory together with all its content, the content of
/etc/bin, or any other directory that is not protected by the file system for the current user.
I can check the home directory myself, but I can't know all possible weak parts, especially since my software is cross-platform.
So the question is:
Is there a list of paths that are not recommended to be deleted by the user so that I can simply match user input by the pattern and at least warn them?