STD.File.CompareFiles( file1, file2 [ , logicalonly ] [ , usecrcs ] )
file1 | A null-terminated string containing the logical name of the first file. |
file2 | A null-terminated string containing the logical name of the second file. |
logicalonly | Optional. A boolean TRUE/FALSE flag that, when TRUE, does not compare physical information from disk but only the logical information in the system datastore (Dali). If omitted, the default is TRUE. |
usecrcs | Optional. A boolean TRUE/FALSE flag indicating that, when TRUE, compares physical CRCs of all the parts on disk. This may be slow on large files. If omitted, the default is FALSE. |
Return: | CompareFiles returns returns an INTEGER4 value. |
The CompareFiles function compares file1 against file2 and returns the following values:
0 | file1 and file2 match exactly |
1 | file1 and file2 contents match, but file1 is newer than file2 |
-1 | file1 and file2 contents match, but file2 is newer than file1 |
2 | file1 and file2 contents do not match and file1 is newer than file2 |
-2 | file1 and file2 contents do not match and file2 is newer than file1 |
Example:
A := STD.File.CompareFiles('Fred1', 'Fred2');