diff --git a/doc/Examples.rst b/doc/Examples.rst index ea65e02cd421b880d5d748c6774798ac115d0d9a..ddb24e0bdd6fd7a4f4881a8eb163cb63184b0bb8 100644 --- a/doc/Examples.rst +++ b/doc/Examples.rst @@ -224,11 +224,11 @@ Up- and Download a file const auto &insert_results = insert_transaction->GetResultSet(); const auto &inserted_file = insert_results.at(0); - // for the download you need to use the RetrieveAndDownloadFilesById task and + // for the download you need to use the RetrieveAndDownloadFileById task and // supply the path where the file shall be stored test_download_file = fs::path("test_download_file_delete_me.dat"); auto download_transaction(connection->CreateTransaction()); - download_transaction->RetrieveAndDownloadFilesById( + download_transaction->RetrieveAndDownloadFileById( inserted_file.GetId(), test_download_file.string()); download_transaction->ExecuteAsynchronously(); download_transaction->WaitForIt().GetCode() diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h index 0fb724a5316e6f615d4236aa24dc44d338fce803..621c6cbd80057c0f97d171f2ffac91e65b77498f 100644 --- a/include/caosdb/transaction.h +++ b/include/caosdb/transaction.h @@ -279,7 +279,7 @@ public: * If the file cannot be downloaded due to unsufficient permissions an error * is appended. */ - auto RetrieveAndDownloadFilesById(const std::string &id, const std::string &local_path) noexcept + auto RetrieveAndDownloadFileById(const std::string &id, const std::string &local_path) noexcept -> StatusCode; /** diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index 5a7cb74683071f42e54f8ad056f37643092bb4ef..58bf54e92554f4660293a869954e9e3482eebdf7 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -172,8 +172,8 @@ auto Transaction::RetrieveById(const std::string &id) noexcept -> StatusCode { return this->status.GetCode(); } -auto Transaction::RetrieveAndDownloadFilesById(const std::string &id, - const std::string &local_path) noexcept +auto Transaction::RetrieveAndDownloadFileById(const std::string &id, + const std::string &local_path) noexcept -> StatusCode { ASSERT_CAN_ADD_RETRIEVAL diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index 21c00f86b20758e03dc6f1d78e4aad11b469479e..db2d76a845f5548eb68570d183e1a7867a91fe15 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -199,7 +199,7 @@ TEST(test_transaction, test_retrieve_and_download) { auto transaction = connection.CreateTransaction(); EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::INITIAL); - transaction->RetrieveAndDownloadFilesById("asdf", "local_path"); + transaction->RetrieveAndDownloadFileById("asdf", "local_path"); EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::GO_ON);