void SFTP::OnReplaceInFiles(clFileSystemEvent& e) { e.Skip(); const wxArrayString& files = e.GetStrings(); for(size_t i = 0; i < files.size(); ++i) { DoFileSaved(files.Item(i)); } }
void PhpPlugin::OnReplaceInFiles(clFileSystemEvent& e) { e.Skip(); if(PHPWorkspace::Get()->IsOpen()) { const wxArrayString& files = e.GetStrings(); for(size_t i = 0; i < files.size(); ++i) { DoSyncFileWithRemote(files.Item(i)); } } }
void PhpSFTPHandler::OnReplaceInFiles(clFileSystemEvent& e) { e.Skip(); if(!PHPWorkspace::Get()->IsOpen()) { return; } SSHWorkspaceSettings settings; settings.Load(); if(!EnsureAccountExists(settings)) { return; } const wxArrayString& files = e.GetStrings(); for(size_t i = 0; i < files.size(); ++i) { DoSyncFileWithRemote(files.Item(i)); } }
void PhpPlugin::OnFileSysetmUpdated(clFileSystemEvent& event) { event.Skip(); if(PHPWorkspace::Get()->IsOpen()) { // Sync the workspace view, notify the view when its done PHPWorkspace::Get()->SyncWithFileSystemAsync(m_workspaceView); } }
void PhpPlugin::OnFileSysetmUpdated(clFileSystemEvent& event) { event.Skip(); if(PHPWorkspace::Get()->IsOpen()) { PHPWorkspace::Get()->SyncWithFileSystem(); m_workspaceView->LoadWorkspace(); } }
void PhpSFTPHandler::OnFileRenamed(clFileSystemEvent& e) { e.Skip(); if(!PHPWorkspace::Get()->IsOpen()) { return; } SSHWorkspaceSettings settings; settings.Load(); if(!EnsureAccountExists(settings)) { return; } wxString oldPath = GetRemotePath(settings, e.GetPath()); wxString newPath = GetRemotePath(settings, e.GetNewpath()); if(oldPath.IsEmpty() || newPath.IsEmpty()) { return; } clDEBUG() << "PHP SFTP: Renaming:" << oldPath << "->" << newPath; // Fire this event, if the sftp plugin is ON, it will handle it clSFTPEvent eventRename(wxEVT_SFTP_RENAME_FILE); eventRename.SetAccount(settings.GetAccount()); eventRename.SetRemoteFile(oldPath); eventRename.SetNewRemoteFile(newPath); EventNotifier::Get()->AddPendingEvent(eventRename); }
void PhpSFTPHandler::OnFileDeleted(clFileSystemEvent& e) { e.Skip(); if(!PHPWorkspace::Get()->IsOpen()) { return; } SSHWorkspaceSettings settings; settings.Load(); if(!EnsureAccountExists(settings)) { return; } const wxArrayString& paths = e.GetPaths(); if(paths.IsEmpty()) { return; } for(size_t i = 0; i < paths.size(); ++i) { wxString remotePath = GetRemotePath(settings, paths.Item(i)); if(remotePath.IsEmpty()) { return; } // Fire this event, if the sftp plugin is ON, it will handle it clSFTPEvent eventDelete(wxEVT_SFTP_DELETE_FILE); eventDelete.SetAccount(settings.GetAccount()); eventDelete.SetRemoteFile(remotePath); EventNotifier::Get()->AddPendingEvent(eventDelete); } }