This documentation is archived and is not being maintained.


Call this member function to get the root of the found file.

virtual CString GetRoot( ) const;

The root of the active search.

You must call FindNextFile at least once before calling GetRoot.

This member function returns the drive specifier and path name used to start a search. For example, calling FindFile with *.dat results in GetRoot returning an empty string. Passing a path, such as c:\windows\system\*.dll, to FindFile results GetRoot returning c:\windows\system\.

See the example for CFileFind::GetFileName.