Compartilhar via


CFileFind::GetRoot

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

virtual CString GetRoot( ) const;

Return Value

The root of the active search.

Remarks

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\.

Example

See the example for CFileFind::GetFileName.

Requirements

Header: afx.h

See Also

Reference

CFileFind Class

Hierarchy Chart