NET FTP Library
CrcEqualLocal Method
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : CrcEqualLocal Method
The local file path of the first file
The local file path of the second file
Return true if the Cyclic Redundancy Check is the same for two local files. This is a fast way to compare if two files are the same
Syntax
'Declaration
 
Public Function CrcEqualLocal( _
   ByVal file1 As System.String, _
   ByVal file2 As System.String _
) As System.Boolean
'Usage
 
Dim instance As FTP
Dim file1 As System.String
Dim file2 As System.String
Dim value As System.Boolean
 
value = instance.CrcEqualLocal(file1, file2)
public System.bool CrcEqualLocal( 
   System.string file1,
   System.string file2
)
public function CrcEqualLocal( 
    file1: System.String;
    file2: System.String
): System.Boolean; 
public function CrcEqualLocal( 
   file1 : System.String,
   file2 : System.String
) : System.boolean;
public: System.bool CrcEqualLocal( 
   System.string* file1,
   System.string* file2
) 
public:
System.bool CrcEqualLocal( 
   System.String^ file1,
   System.String^ file2
) 

Parameters

file1
The local file path of the first file
file2
The local file path of the second file
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.CrcEqual("c:\\file1.txt", "c:\\file2.txt");
Console.WriteLine("The files 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.CrcEqual("c:\file1.txt", "c:\file2.txt")
Console.WriteLine("The files 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