TEST_F(TestWebServer, CanHeadFile) { CCurlFile curl; ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML)))); CheckHtmlTestFileResponse(curl); }
bool CFTPDirectory::Exists(const CURL& url) { // make sure ftp dir ends with slash, // curl need to known it's a dir to check ftp directory existence. std::string file = url.Get(); URIUtils::AddSlashAtEnd(file); CCurlFile ftp; CURL url2(file); return ftp.Exists(url2); }
bool CFTPDirectory::Exists(const char* strPath) { // make sure ftp dir ends with slash, // curl need to known it's a dir to check ftp directory existence. CStdString file = strPath; URIUtils::AddSlashAtEnd(file); CCurlFile ftp; CURL url(file); return ftp.Exists(url); }
bool CDAVDirectory::Exists(const CURL& url) { CCurlFile dav; // Set the PROPFIND custom request else we may not find folders, depending // on the server's configuration std::string strRequest = "PROPFIND"; dav.SetCustomRequest(strRequest); dav.SetRequestHeader("depth", 0); return dav.Exists(url); }
bool CRSSDirectory::Exists(const CURL& url) { CCurlFile rss; return rss.Exists(url); }
bool CRSSDirectory::Exists(const char* strPath) { CCurlFile rss; CURL url(strPath); return rss.Exists(url); }
TEST_F(TestWebServer, CanNotHeadNonExistingFile) { CCurlFile curl; ASSERT_FALSE(curl.Exists(CURL(GetUrlOfTestFile("file_does_not_exist")))); }
bool CFTPDirectory::Exists(const char* strPath) { CCurlFile ftp; CURL url(strPath); return ftp.Exists(url); }