From 2e9ac3cc1a37f98ec48e05bfafa74b05073c7d38 Mon Sep 17 00:00:00 2001 From: Tpt Date: Fri, 29 Dec 2023 15:06:27 +0100 Subject: [PATCH] Python Store.backup: allows pathlib Issue #699 --- python/src/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/store.rs b/python/src/store.rs index 8923b1f6..81abb840 100644 --- a/python/src/store.rs +++ b/python/src/store.rs @@ -726,10 +726,10 @@ impl PyStore { /// If you want to move your data to another RDF storage system, you should have a look at the :py:func:`dump_dataset` function instead. /// /// :param target_directory: the directory name to save the database to. - /// :type target_directory: str + /// :type target_directory: str or os.PathLike[str] /// :rtype: None /// :raises OSError: if an error happens during the backup. - fn backup(&self, target_directory: &str, py: Python<'_>) -> PyResult<()> { + fn backup(&self, target_directory: PathBuf, py: Python<'_>) -> PyResult<()> { py.allow_threads(|| { self.inner .backup(target_directory)