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