Email list hosting service & mailing list manager

ensure-directories aka create-directories Lassi Kortela (31 Jul 2020 10:47 UTC)
(missing)
(missing)
Re: ensure-directories aka create-directories Lassi Kortela (31 Jul 2020 12:32 UTC)
Re: ensure-directories aka create-directories John Cowan (31 Jul 2020 13:03 UTC)
Re: ensure-directories aka create-directories John Cowan (31 Jul 2020 13:10 UTC)
Re: ensure-directories aka create-directories Lassi Kortela (31 Jul 2020 13:14 UTC)
Re: ensure-directories aka create-directories John Cowan (31 Jul 2020 13:19 UTC)
Re: ensure-directories aka create-directories Lassi Kortela (31 Jul 2020 13:31 UTC)
Re: ensure-directories aka create-directories Shiro Kawai (31 Jul 2020 18:03 UTC)
Re: ensure-directories aka create-directories Lassi Kortela (02 Aug 2020 10:20 UTC)
Re: ensure-directories aka create-directories Lassi Kortela (31 Jul 2020 12:10 UTC)

Re: ensure-directories aka create-directories Lassi Kortela 31 Jul 2020 13:14 UTC

> Python has an inverse operation as
> well that is not a full rm -rf:  given foo/bar/baz it removes it, then
> removes foo/bar, then removes foo.  The usual rules for rmdir() apply.
> The Python version silently stops if any directory is non-empty, does
> not exist, etc., but clearly an exception should be raised.   I'm not
> sure that this is quite as strong a candidate.

This is nice to have but is not as often needed, and the desired
semantics are not as clear: if we have a whole tree full of empty
directories, would it make more sense to delete all of them? Doing a
naive check for an empty vs non-empty directory would consider a tree of
empty directories (with more than one branch at some depth) non-empty.
Also, should zero-byte files count as empty?

Incidentally I wrote a program last year to remove empty trees from the
command line: <https://github.com/lassik/rmempty>.