From 1528350890515ce97d0b0288ca20db783f1ca334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 13 Feb 2026 16:42:27 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(usage):=20note=20that=20hom?= =?UTF-8?q?e=20dir=20is=20in=20stdlib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users keep asking for a home directory property (see #235). Add a "Directories not covered" section pointing to pathlib.Path.home() and os.path.expanduser() so they can find the answer without filing issues. --- docs/usage.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/usage.rst b/docs/usage.rst index 4dbf440..8b27b8b 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -151,6 +151,18 @@ Defaults to ``False``. dirs = PlatformDirs("SuperApp", "Acme", ensure_exists=True) dirs.user_cache_dir # directory is created if it does not exist +Directories not covered +----------------------- + +``platformdirs`` does not provide a property for the user's **home directory**. Use +:meth:`pathlib.Path.home` or :func:`os.path.expanduser` from the standard library instead: + +.. code-block:: pycon + + >>> from pathlib import Path + >>> Path.home() + PosixPath('/Users/trentm') + XDG environment variables -------------------------