sda.documents.resolver#
Unified document resolver: local filesystem first, MS Graph API fallback.
Attributes#
Functions#
|
Resolve a document path, downloading from SharePoint if not found locally. |
Module Contents#
- sda.documents.resolver.GraphClient#
- sda.documents.resolver.get_document(path_or_relative, download_dir=None)#
Resolve a document path, downloading from SharePoint if not found locally.
- Parameters:
path_or_relative (
str) – Absolute local path or relative SharePoint path (e.g. ‘Reports/T297.docx’).download_dir (
Path, optional) – Where to save downloaded files. Defaults to ~/.sda/downloads/.
- Returns:
Local filesystem path to the document.
- Return type:
Path