jaraco / jaraco.path

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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',
        },
    },
)

About

License:MIT License


Languages

Language:Python 100.0%