System.Net.FtpWebRequest.ContentOffset Property

Gets or sets a byte offset into the file being downloaded by this request.

Syntax

public long ContentOffset { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Set the FtpWebRequest.ContentOffset property when downloading a file from an FTP server. This offset indicates the position in the server's file that marks the start of the data to be downloaded. The offset is specified as the number of bytes from the start of the file; the offset of the first byte is zero.

Setting FtpWebRequest.ContentOffset causes the System.Net.FtpWebRequest to send a restart (REST) command to the server. This command is ignored by most FTP server implementations if you are uploading data to the server.

Changing FtpWebRequest.ContentOffset after calling the FtpWebRequest.GetRequestStream, FtpWebRequest.BeginGetRequestStream(AsyncCallback, object), FtpWebRequest.GetResponse, or FtpWebRequest.BeginGetResponse(AsyncCallback, object) method causes an InvalidOperationException exception.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0