Metadata-Version: 2.1
Name: provide-dir
Version: 0.0.2
Summary: Provides a directory with all its parent directories, if it does not yet exist
Home-page: https://github.com/Nagidal/provide_dir
Author: Sven Siegmund
Author-email: sven.siegmund@gmail.com
License: UNKNOWN
Keywords: rmdir,remove dir,remove directory,recursive
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Testing
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# provide_directory

Function to create the given path, including potential parent directories. Returns a bool if at leas one directory as been created.

## Dependencies

None

## Usage

```python
from pathlib import Path
from provide_dir import provide_dir

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

try:
    was_created = provide_path(needed_path)
    if was_created:
        print(f"{needed_path} was successfully created")
    else:
        print(f"{needed_path} already exists")
except FileExistsError:
    print(f"Cannot create {needed_path} because it already exists as a file")
```

## 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`.


