Skip to main content

Provides a directory with all its parent directories, if it does not yet exist

Project description

provide_directory

Function to create the given path, including potential parent directories. Writes to the provided sink (e.g. print) whether the directory was created or whether it already existed.

Dependencies

None

Usage

from pathlib import Path
from provide_dir import provide_dir

needed_path = Path("/path/to/directory/with/subdirectories")
provide_dir(needed_path, print)

Installation

Pip

pip install provide_dir

Developer's Installation

You can clone the repository and install it with pip install -e /path/to/local/repository.

Test dependencies

To run the tests you will need

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

provide_dir-0.1.2.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

provide_dir-0.1.2-py3-none-any.whl (3.8 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