NET FTP Library
DirectoriesEqual Method
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : DirectoriesEqual Method
Returns true if the Cyclic Redundancy Check Passes for all files in two local directories
Syntax
'Declaration
 
Public Function DirectoriesEqual( _
   ByVal localPath1 As System.String, _
   ByVal localPath2 As System.String _
) As System.Boolean
'Usage
 
Dim instance As FTP
Dim localPath1 As System.String
Dim localPath2 As System.String
Dim value As System.Boolean
 
value = instance.DirectoriesEqual(localPath1, localPath2)
public System.bool DirectoriesEqual( 
   System.string localPath1,
   System.string localPath2
)
public function DirectoriesEqual( 
    localPath1: System.String;
    localPath2: System.String
): System.Boolean; 
public function DirectoriesEqual( 
   localPath1 : System.String,
   localPath2 : System.String
) : System.boolean;
public: System.bool DirectoriesEqual( 
   System.string* localPath1,
   System.string* localPath2
) 
public:
System.bool DirectoriesEqual( 
   System.String^ localPath1,
   System.String^ localPath2
) 

Parameters

localPath1
localPath2
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
bool result = ftp.DirectoriesEqual("c:\\directory1", "c:\\directory2");
Console.WriteLine("The directories are the same : {0}",result);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
Dim result As Boolean = ftp.DirectoriesEqual("c:\directory1", "c:\directory2")
Console.WriteLine("The directories are the same : {0}",result)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members