25 namespace ElementsServices {
31 m_connection(connection), m_fileMap(dependency.fileMap()) {
36 const auto& localFile = item.first;
37 const auto& distantFile = item.second;
52 return boost::filesystem::is_regular_file(localFile);
57 path localFile)
const {
68 path localFile)
const {
69 if (not boost::filesystem::is_regular_file(localFile)) {
72 return boost::filesystem::file_size(localFile) > 0;
The dependency configurations holds, for each test file to be retrieved:
ELEMENTS_API void createLocalDirOf(path localFile)
Macro to silence unused variables warnings from the compiler.
bool overwritingAllowed() const
Check whether existing local files can be overwritten.
ConnectionConfiguration m_connection
bool fileShouldBeWritten(path localFile) const
virtual std::string createDownloadCommand(path distantFile, path localFile) const =0
ELEMENTS_API std::pair< std::string, std::string > runCommandAndCaptureOutErr(std::string command)
bool hasBeenDownloaded(path distantFile, path localFile) const
boost::filesystem::path path
void downloadAllFiles() const
std::map< path, path > m_fileMap
An exception raised when downloading fails.
The connection configuration mainly holds:
DataSynchronizer(const ConnectionConfiguration &connection, const DependencyConfiguration &dependency)
bool fileAlreadyExists(path localFile) const
void downloadOneFile(path distantFile, path localFile) const