Gets the file size of the remote file on the FTP server as represented in ASCII.

Namespace: Jscape.Ftp
Assembly: Jscape.Ftp (in Jscape.Ftp.dll) Version: 2.4.5.0

Syntax

C#
public long GetFileSize(
	string remoteName
)
Visual Basic
Public Function GetFileSize ( _
	remoteName As String _
) As Long
Visual C++
public:
long long GetFileSize(
	String^ remoteName
)

Parameters

remoteName
Type: System..::..String
The remote file.

Return Value

The file size in bytes.

Remarks

This feature is not supported by RFC-959 and may not work on all FTP servers. For large files it may take some time to return the file size as the FTP server will often convert the file to ASCII before returning the file size.

Exceptions

ExceptionCondition
Jscape.Ftp..::..FtpExceptionIf an I/O or FTP error occurs.

See Also