s365b.modules.paths =================== .. py:module:: s365b.modules.paths .. autoapi-nested-parse:: Folder paths: folder names joined with ``/``. A ``/`` inside a folder name ("Projects/2026") is stored as U+2215 DIVISION SLASH, which looks the same, so a path splits back into the folders it was made of. Restore turns it back into ``/``. Attributes ---------- .. autoapisummary:: s365b.modules.paths.SLASH Functions --------- .. autoapisummary:: s365b.modules.paths.join s365b.modules.paths.names s365b.modules.paths.file_path Module Contents --------------- .. py:data:: SLASH :value: '∕' .. py:function:: join(prefix: str, name: str) -> str Return the path of a folder named ``name`` inside ``prefix``. :param prefix: The parent's path; empty for a top-level folder. :param name: The folder's own name. :returns: The path. .. py:function:: names(path: str) -> tuple[str, ...] Return the folder names along a path, as Exchange names them. :param path: A path made by :func:`join`. :returns: The names, outermost first; empty parts are skipped. .. py:function:: file_path(folder: str, name: str, extension: str, taken: set[str]) -> str A unique path for an item in an archive: its folders, then its name. Names are cut to 80 characters and stripped of what file systems refuse; a name used before gets " (2)", " (3)"… Folder names with a "/" keep it as the lookalike they are stored with. :param folder: The item's folder path. :param name: The item's name, e.g. a message subject or a file name. :param extension: File extension, without the dot; empty to keep the extension the name has (a file's own). :param taken: Paths used so far (case-insensitively); updated. :returns: The path, with ``/`` between folders.