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 Code style: Black https://img.shields.io/badge/skeleton-2022-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.4.0.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

jaraco.path-3.4.0-py3-none-any.whl (5.9 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