edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing

FTPConnectionExists Method

Checks for the existence of a file on the server.

Definition

Namespace: EnterpriseDT.Net.Ftp
Assembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.7.0.0
C#
public virtual bool Exists(
	string remoteFile
)

Parameters

remoteFile  String
Path of remote file.

Return Value

Boolean
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