NET SFTP Library
DirectoriesEqual Method
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP 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 SFTP
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
SFTP sftp = new SFTP(); //Trial Mode            
            //SFTP sftp = new SFTP("place user name here", "place license key here");
             
            // set the name of the SSH server( its URL )
            sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
            sftp.UserName  = "anonymous"; // replace with your user name
            sftp.Password = "user@mail.com"; // replace with your password
             
            bool result = sftp.DirectoriesEqual("c:\\directory1", "c:\\directory2");
            Console.WriteLine("The directories are the same : {0}",result);
Dim sftp As SFTP = New SFTP() 'Trial Mode
            'Dim sftp As SFTP = New SFTP("place user name here", "place license key here");
             
            ' set the name of the SSH server( its URL )
            sftp.HostAddress = "some.sftp.server.com" ' replace with your SFTP server
            sftp.UserName  = "anonymous" ' replace with your user name
            sftp.Password = "user@mail.com" ' replace with your password
             
            Dim result As Boolean = sftp.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

SFTP Class
SFTP Members