SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
FtpUtils.cpp File Reference
#include <sstream>
#include <algorithm>
#include <ftplib.h>
#include <FtpUtils.h>
#include <Utils.h>
Include dependency graph for FtpUtils.cpp:

Go to the source code of this file.

Namespaces

 FtpUtils
 FtpUtils provides networking functionality via the FTP protocol.
 

Functions

bool FtpUtils::uploadFileLatestVersion (const string &fileDir, const string &fileName, const string &ftpHost, const string &ftpUser, const string &ftpPwd, const string &ftpDir, string &errorMsg)
 Uploads the file to the ftp server. Checks if the filename already exists and adds a version number. More...
 
bool FtpUtils::downloadFileLatestVersion (const string &fileDir, const string &fileName, const string &ftpHost, const string &ftpUser, const string &ftpPwd, const string &ftpDir, string &errorMsg)
 Download the file from the ftp server which has the latest version and store it as fileName locally. More...
 
bool FtpUtils::uploadFile (const string &fileDir, const string &fileName, const string &ftpHost, const string &ftpUser, const string &ftpPwd, const string &ftpDir, string &errorMsg)
 Uploads file to the ftp server. More...
 
bool FtpUtils::downloadFile (const string &fileDir, const string &fileName, const string &ftpHost, const string &ftpUser, const string &ftpPwd, const string &ftpDir, string &errorMsg)
 Download file from the ftp server. More...
 
bool FtpUtils::downloadAllFilesFromDir (const string &fileDir, const string &ftpHost, const string &ftpUser, const string &ftpPwd, const string &ftpDir, const string &searchFileTag, string &errorMsg)
 
bool FtpUtils::getAllFileNamesWithTag (ftplib &ftp, const string &localDir, const string &searchFileTag, vector< string > &retrievedFileNames, string &errorMsg)
 Get a list of all filenames with given search file tag in remote directory. More...
 
string FtpUtils::getLatestFilename (ftplib &ftp, const string &fileDir, const string &fileName)
 Returns the latest fileName of the same fullPathAndFilename. More...
 
int FtpUtils::getVersionInFilename (const string &filename)
 Returns the version number at the end of the fileName. More...
 

Detailed Description

Authors
Marcus Hudritsch, Michael Goettlicher
Date
May 2019
Remarks
Please use clangformat to format the code. See more code style on https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style

Definition in file FtpUtils.cpp.