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;
Macro to silence unused variables warnings from the compiler.
The connection configuration mainly holds:
bool overwritingAllowed() const
Check whether existing local files can be overwritten.
DataSynchronizer(const ConnectionConfiguration &connection, const DependencyConfiguration &dependency)
virtual std::string createDownloadCommand(path distantFile, path localFile) const =0
ConnectionConfiguration m_connection
bool fileAlreadyExists(path localFile) const
std::map< path, path > m_fileMap
void downloadAllFiles() const
void downloadOneFile(path distantFile, path localFile) const
bool hasBeenDownloaded(path distantFile, path localFile) const
bool fileShouldBeWritten(path localFile) const
The dependency configurations holds, for each test file to be retrieved:
An exception raised when downloading fails.
Elements::Path::Item path
ELEMENTS_API void createLocalDirOf(path localFile)
ELEMENTS_API std::pair< std::string, std::string > runCommandAndCaptureOutErr(std::string command)