edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing
Checks for the existence of a file on the server.

Namespace: EnterpriseDT.Net.Ftp
Assembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 9.4.0.40

Syntax

C#
public virtual bool Exists(
	string remoteFile
)
Visual Basic
Public Overridable Function Exists ( _
	remoteFile As String _
) As Boolean
Visual C++
public:
virtual bool Exists(
	String^ remoteFile
)

Parameters

remoteFile
Type: System..::..String
Path of remote file.

Return Value

true if the named file exists on the server.

Remarks

Not all servers support absolute paths, so it's safer to use relative paths. The path separator should be '/'. If problems are encountered the safest option is to change into the desired directory prior to calling this method and then supplying the name of the file without its path.

The existence of local files may be checked using the Exists(String) method.

See Also