/// <summary> /// Raises <b>Rmd</b> event. /// </summary> /// <param name="e">Event data.</param> private void OnRmd(FTP_e_Rmd e) { if(this.Rmd != null){ this.Rmd(this,e); } }
private void RMD(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 Invalid directory name."); } /* This command causes the directory specified in the pathname to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative). */ FTP_e_Rmd eArgs = new FTP_e_Rmd(argsText); OnRmd(eArgs); // API didn't provide response. if(eArgs.Response == null){ WriteLine("500 Internal server error: FTP server didn't provide response for RMD command."); } else{ foreach(FTP_t_ReplyLine reply in eArgs.Response){ WriteLine(reply.ToString()); } } }