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:31 UTC

> Assuming that mkdir and rmdir() are O(1), then Python makedirs and
> removedirs are O(n) in the length of their argument, whereas both
> shutil.rmtree (same as "rm -r") and the rmempty you mention str
> unbounded.

Yes.

> I'd like to keep things with unbounded time out of this SRFI.

Me too. I was questioning whether a Python-style more limited empty
directory remover makes sense to have in any library. Since they put it
in Python, we should start from the assumption that it is useful.

While there's some truth to the O(n) vs unbounded distinction, in
practice if you are unexpectedly deleting a huge stack of empty
directories there is something funny going on with your file system
anyway. More generally, programs with environmental dependencies do not
cope all that well when their environment is in an odd state.

Another distinction that would be useful in a deletion procedure is
stopping at file system (struct stat.st_dev) boundaries like rsync and
some other tools optionally do. The design space gets quite complex.