Example #1
0
TEST_F(TestWebServer, CanHeadFile)
{
  CCurlFile curl;
  ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML))));

  CheckHtmlTestFileResponse(curl);
}
Example #2
0
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);
}
Example #3
0
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);
}
Example #4
0
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);
}
Example #5
0
bool CRSSDirectory::Exists(const CURL& url)
{
  CCurlFile rss;
  return rss.Exists(url);
}
Example #6
0
bool CRSSDirectory::Exists(const char* strPath)
{
  CCurlFile rss;
  CURL url(strPath);
  return rss.Exists(url);
}
Example #7
0
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);
}