Compartir a través de


CFtpFileFind::FindFile

Call this member function to find an FTP file.

virtual BOOL FindFile(
   LPCTSTR pstrName = NULL,
   DWORD dwFlags = INTERNET_FLAG_RELOAD 
);

Parameters

  • pstrName
    A pointer to a string containing the name of the file to find. If NULL, the call will perform a wildcard search (*).

  • dwFlags
    The flags describing how to handle this session. These flags can be combined with the bitwise OR operator (|) and are as follows:

    • INTERNET_FLAG_RELOAD   Get the data from the wire even if it is locally cached. This is the default flag.

    • INTERNET_FLAG_DONT_CACHE   Do not cache the data, either locally or in any gateways.

    • INTERNET_FLAG_RAW_DATA   Override the default to return the raw data (WIN32_FIND_DATA structures for FTP).

    • INTERNET_FLAG_SECURE   Secures transactions on the wire with Secure Sockets Layer or PCT. This flag is applicable to HTTP requests only.

    • INTERNET_FLAG_EXISTING_CONNECT   If possible, reuse the existing connections to the server for new FindFile requests instead of creating a new session for each request.

Return Value

Nonzero if successful; otherwise 0. To get extended error information, call the Win32 function GetLastError.

Remarks

After calling FindFile to retrieve the first FTP file, you can call FindNextFile to retrieve subsequent FTP files.

Example

See the example in the CFtpFileFind class overview.

Requirements

Header: afxinet.h

See Also

Concepts

CFtpFileFind Class

CFtpFileFind Members

Hierarchy Chart

CFtpFileFind::FindNextFile

CFileFind Class