Elements  5.8
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IrodsSynchronizer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2020 Euclid Science Ground Segment
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License as published by the Free
6  * Software Foundation; either version 3.0 of the License, or (at your option)
7  * any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include <string>
20 
22 
23 namespace ElementsServices {
24 namespace DataSync {
25 
27  return checkCall ("iget --help");
28 }
29 
31  const ConnectionConfiguration& connection,
32  const DependencyConfiguration& dependency) :
33  DataSynchronizer(connection, dependency) {
34  if (not irodsIsInstalled()) {
35  throw std::runtime_error(
36  "You are trying to use iRODS, "
37  "but it does not seem to be installed.");
38  }
39 }
40 
42  path distantFile,
43  path localFile) const {
44  std::string cmd = "irsync i:";
45  cmd += distantFile.string() + " " + localFile.string();
46  return cmd;
47 }
48 
49 } // namespace DataSync
50 } // namespace ElementsServices
The dependency configurations holds, for each test file to be retrieved:
std::string createDownloadCommand(path distantFile, path localFile) const override
IrodsSynchronizer(const ConnectionConfiguration &connection, const DependencyConfiguration &dependency)
STL class.
ELEMENTS_API bool irodsIsInstalled()
Check whether the iRODS client is installed.
Base class to synchronize test data.
boost::filesystem::path path
Definition: DataSyncUtils.h:33
The connection configuration mainly holds:
ELEMENTS_API bool checkCall(std::string command)