Skip to main content

FtpWebRequest Class

Namespace: System.Net · Assembly: GHIElectronics.TinyCLR.Networking.Ftp

FtpWebRequest - first implement Active mode

public class FtpWebRequest : WebRequest

Properties

RenameTo

public string RenameTo { get; set; }

The new name of the file/directory for rename command

UseBinary

public bool UseBinary { get; set; }

Gets or sets a Boolean value that specifies the data type for file transfers. true for binary (Image / "I"), false for ASCII ("A"). Mirrors System.Net.FtpWebRequest.UseBinary.

KeepAlive

public bool KeepAlive { get; set; }

Gets or sets a value that specifies whether to keep the control connection alive after the request completes. Mirrors System.Net.FtpWebRequest.KeepAlive. The TinyCLR implementation closes connections after each request regardless; the property is accepted for source-compatibility.

EnableSsl

public bool EnableSsl { get; set; }

Gets or sets a value that specifies that an SSL connection should be used (FTPS). Mirrors System.Net.FtpWebRequest.EnableSsl. On TinyCLR, FTPS is not supported and setting this to true throws NotSupportedException. The Desktop sister wires this up to SslStream.

UsePassive

public bool UsePassive { get; set; }

Set ftp mode

Credentials

public NetworkCredential Credentials { get; set; }

Set or Get NetworkCredential if user have send user name and password. (inherited)

Method

public override string Method { get; set; }

When overridden in a descendant class, gets or sets the protocol method to use in this request. (inherited)

RequestUri

public override Uri RequestUri { get; }

Gets the URI requested by the FtpWebRequest. Override of System.Net.WebRequest.RequestUri.

Timeout

public override int Timeout { get; set; }

Gets or sets the length of time, in milliseconds, until the request to the server times out. Mirrors System.Net.WebRequest.Timeout.

ReadWriteTimeout

public int ReadWriteTimeout { get; set; }

Gets or sets a time-out, in milliseconds, when reading from or writing to a stream. Mirrors System.Net.FtpWebRequest.ReadWriteTimeout.

Methods

Abort()

public override void Abort()

Cancels a request to an FTP server. Override of System.Net.WebRequest.Abort. Best-effort: closes the command and data sockets if they are open.

GetResponse()

public override WebResponse GetResponse()

Get response from the ftp server

Returns WebResponse

GetRequestStream()

public override Stream GetRequestStream()

Get request stream for upload command

Returns Stream