[issue22040] Add a "force" parameter to shutil.rmtree

R. David Murray report at bugs.python.org
Tue Jul 22 22:12:24 CEST 2014


R. David Murray added the comment:

Actually it does apply on unix:

rdmurray at session:~/tmp>ls -ld foo
drwxr-x--- 2 rdmurray rdmurray 4096 Jul 22 16:09 foo
rdmurray at session:~/tmp>ls -l foo
total 0
-r--r----- 1 rdmurray rdmurray 0 Jul 22 16:09 bar
rdmurray at session:~/tmp>rm -r foo
rm: remove write-protected regular empty file ‘foo/bar’? 

If I say yes it will remove it, since I have write perms on the directory.  rm -rf will not prompt and will delete it.

I believe the situation is analogous on Windows, but I"m not sure.

----------
nosy: +r.david.murray, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22040>
_______________________________________


More information about the Python-bugs-list mailing list