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; } }
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; } }