Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# Distribution / packaging
*.egg-info/
dist/
build/

# Database
*.db

# IDE
.idea/
.vscode/
*.swp

# Testing
.pytest_cache/
.coverage
htmlcov/
9 changes: 9 additions & 0 deletions src/docflow/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from __future__ import annotations
from pathlib import Path


def ensure_dir(path: str | Path) -> Path:
"""Ensure the directory exists, creating it if necessary."""
p = Path(path)
p.mkdir(parents=True, exist_ok=True)
return p
Loading