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

FTPConnectionDirectoryExists Method

Tests if the given directory exists.

Definition

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

Parameters

remoteDirectory  String
 

Return Value

Boolean
true if directory exists and false otherwise

Remarks

The FTP protocol doesn't specify a standard way of testing for the existence of a directory, so this method tries to change into the directory and assumes that that the directory doesn't exist if an exception is thrown. The current working directory is restored before the method returns.

See Also