private void CDUP(string argsText) { if(m_SessionRejected){ WriteLine("500 Bad sequence of commands: Session rejected."); return; } if(!this.IsAuthenticated){ WriteLine("530 Please authenticate firtst !"); return; } if(!string.IsNullOrEmpty(argsText)){ WriteLine("501 Error in arguments."); } /* This command is a special case of CWD, and is included to simplify the implementation of programs for transferring directory trees between operating systems having different syntaxes for naming the parent directory. The reply codes shall be identical to the reply codes of CWD. */ FTP_e_Cdup eArgs = new FTP_e_Cdup(); OnCdup(eArgs); // API didn't provide response. if(eArgs.Response == null){ WriteLine("500 Internal server error: FTP server didn't provide response for CDUP command."); } else{ foreach(FTP_t_ReplyLine reply in eArgs.Response){ WriteLine(reply.ToString()); } } }
/// <summary> /// Raises <b>Cdup</b> event. /// </summary> /// <param name="e">Event data.</param> private void OnCdup(FTP_e_Cdup e) { if(this.Cdup != null){ this.Cdup(this,e); } }