Source code for chemparseplot.parse.file_

import glob
import logging
from pathlib import Path

log = logging.getLogger(__name__)


[docs] def find_file_paths(file_pattern: str) -> list[Path]: """Finds and sorts files matching a glob pattern. ```{versionadded} 0.1.0 ``` """ log.info(f"Searching for files with pattern: '{file_pattern}'") file_paths = sorted(Path(p) for p in glob.glob(file_pattern)) log.info(f"Found {len(file_paths)} file(s).") return file_paths