BOOL VerifyFile( |
|
LPCTSTR lpszLocalFile, |
|
|
LPCTSTR lpszRemoteFile |
|
); |
The VerifyFile method attempts to verify that the size of a
file on the local system is the same as the specified file on the
server.
Parameters
- lpszLocalFile
- A pointer to a string that specifies the name
of file on the local system.
- lpszRemoteFile
- A pointer to a string that specifies the name
of the file on the server.
Return Value
If the method succeeds, the return value is non-zero. If the
method fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
The VerifyFile method will attempt to verify that the
contents of the local and remote files are identical by comparing the
size of the files. This method is provided for compatibility with the
File Transfer Protocol API, and should not be considered a reliable
method for comparing files. Web servers may not consistently return
file size information for dynamically created content such as HTML
pages which use server-side includes.
It is not recommended that you use this method with text files
because of the different end-of-line conventions used by different
operating systems. For example, a text file on a Windows system uses
a carriage-return and linefeed pair to indicate the end of a line of
text. However, on a UNIX system, a single linefeed is used to
indicate the end of a line. This can cause the VerifyFile
method to indicate the files are not identical, even though the only
difference is in the end-of-line characters that are used.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: cshtpv10.lib
Unicode: Implemented as Unicode and ANSI versions.
See Also
DeleteFile,
GetFile,
GetFileSize,
PutFile
|