CSharpUtils.Net.FTP.RenameFile C# (CSharp) Метод

RenameFile() публичный Метод

Rename a file on the ftp server
public RenameFile ( string oldfilename, string newfilename ) : void
oldfilename string Old file name
newfilename string New file name
Результат void
		public void RenameFile(string oldfilename, string newfilename)		// #######################################
		{
			Connect();
			SendCommand("RNFR " + oldfilename);
			ReadResponse();
			if (response != 350)
			{
#if (FTP_DEBUG)
				Console.Write("\r" + responseStr);
#endif
				throw new Exception(responseStr);
			}
			else
			{
				SendCommand("RNTO " + newfilename);
				ReadResponse();
				if (response != 250)
				{
#if (FTP_DEBUG)
					Console.Write("\r" + responseStr);
#endif
					throw new Exception(responseStr);
				}
			}
		}
		/// <summary>