Skip to main content

miscellaneous path functions

Project description

https://img.shields.io/pypi/v/jaraco.path.svg https://img.shields.io/pypi/pyversions/jaraco.path.svg 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',
        },
    },
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaraco_path-3.7.1.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distribution

jaraco.path-3.7.1-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page