Beispiel #1
0
bool DirectoryExists(VFSURL* url)
{
  CSFTPSessionPtr session = CSFTPSessionManager::Get().CreateSession(url);
  if (session)
    return session->DirectoryExists(url->filename);
  else
  {
    XBMC->Log(ADDON::LOG_ERROR, "SFTPFile: Failed to create session to check exists");
    return false;
  }
}
Beispiel #2
0
bool CSFTPDirectory::Exists(const char* strPath)
{
  CURL url(strPath);

  CSFTPSessionPtr session = CSFTPSessionManager::CreateSession(url);
  if (session)
    return session->DirectoryExists(url.GetFileName().c_str());
  else
  {
    CLog::Log(LOGERROR, "SFTPDirectory: Failed to create session to check exists");
    return false;
  }
}