9 lines
282 B
Python
9 lines
282 B
Python
"""Fonctions utilitaires pour manipuler le système de fichiers."""
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def ensure_parent_dir(target_path: Path) -> None:
|
|
"""Crée le répertoire parent d'un chemin de fichier s'il est absent."""
|
|
target_path.parent.mkdir(parents=True, exist_ok=True)
|