Пример #1
0
        /// <summary>
        /// Request the server to set up the put
        /// </summary>
        /// <param name="remoteFile"> name of remote file in
        /// current directory
        /// </param>
        /// <param name="append">     true if appending, false otherwise
        ///
        /// </param>
        private void InitPut(string remoteFile, bool append)
        {
            // set up data channel
            data = control.CreateDataSocket(connectMode);

            // send the command to store
            string cmd   = append ? "APPE ":"STOR ";
            string reply = control.SendCommand(cmd + remoteFile);

            // Can get a 125 or a 150
            string[] validCodes = new string[] { "125", "150" };
            lastValidReply = control.ValidateReply(reply, validCodes);
        }