Skip to content

jaraco/jaraco.path

This branch is up to date with main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

57b1e74 · Nov 2, 2024
Oct 28, 2024
Sep 11, 2024
Sep 11, 2024
Aug 26, 2024
Aug 8, 2024
Jun 16, 2022
Oct 25, 2024
May 31, 2024
Apr 11, 2023
Aug 29, 2024
Feb 7, 2024
Aug 29, 2024
Oct 29, 2024
Mar 31, 2024
Nov 2, 2024
Jun 21, 2023
Aug 31, 2024

Repository files navigation

tests Ruff https://img.shields.io/badge/skeleton-2024-informational

Hidden File Detection

jaraco.path provides cross platform hidden file detection:

from jaraco import path
if path.is_hidden('/'):
    print("Your root is hidden")

hidden_dirs = filter(is_hidden, os.listdir('.'))

Directory Builder

When testing (and perhaps in other cases), it's often necessary to construct a tree of directories/files. This project provides a build function to simply create such a directory from a dictionary definition:

from jaraco.path import build
build(
    {
        'foo': 'Content of foo',
        'subdir': {
            'foo': 'Content of subdir/foo',
        },
    },
)