The pathlib_extensions module serves two related purposes:
- Enable use of new filesystem path features on older Python versions. For example,
pathlib.PurePath.with_stem()is new in Python 3.9, butpathlib_extensionsallows users on Python 3.6 through 3.8 to use it too. - Enable experimentation with new filesystem path features that are not found
in the
pathlibmodule.
This module currently contains the following:
- Experimental features
Path.is_image_file()Path.is_audio_file()Path.is_video_file()
- In
pathlibsince Python 3.9PurePath.with_stem()PurePath.is_relative_to()Path.readlink()
- In
pathlibsince Python 3.8Path.link_to()
- In
pathlibsince Python 3.7Path.is_mount()
To run tests, run tests/test_pathlib_extensions.py. You will also need to install
the latest version of pathlib if you are using a version of Python that
does not include pathlib as a part of the standard library.