On 11/8/22, Charles Machalow <csm10...@gmail.com> wrote: > I tend to prefer adding isjunction instead of changing ismount since I tend > to not think about junctions as being mounts (but closer to symlinks)..
Junctions are mount points that are similar to Unix bind mounts where it counts -- in the behavior that's implemented for them in the kernel. This behavior isn't exclusive to just volume mount points. It's implemented the same for all junctions, and it's distinctly different from symlinks. There are times that I want to handle non-root mount points as if they're symlinks, such as deleting them in rmtree(). There are times where I want to handle them distinctly from symlinks, such as adding code in copytree() to copy a junction. > I guess either way the closeness of the concepts is a different story than > the specific ask here. In other words: for clarity, adding a specific > method makes the most sense to me. Adding a posixpath.isjunction() function that's always false seems a waste compared to common support for os.path.ismount(). On the other hand, the realpath() call in posixpath.ismount() is expensive, so calling os.path.ismount() to decide how to handle a directory would be expensive on POSIX. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/KC5UNZRMTL6AUYOLJG7A4VV2LIJAVN6V/ Code of Conduct: http://python.org/psf/codeofconduct/