RemObjects.InternetPack.Ftp.VirtualFtp.DiscFolder.DeleteFile C# (CSharp) Method

DeleteFile() public method

public DeleteFile ( String fileName, VirtualFtpSession session ) : void
fileName String
session VirtualFtpSession
return void
		public override void DeleteFile(String fileName, VirtualFtpSession session)
		{
			if (!AllowDeleteItems(session))
				throw new FtpException(550, String.Format("Cannot delete file \"{0}\", permission to delete from this folder denied.", fileName));

			if (!HasFile(fileName))
				throw new FtpException(550, String.Format("A file named \"{0}\" does not exist.", fileName));

			File.Delete(Path.Combine(LocalPath, fileName));
		}