CFileFind identify a User created Directory Folder as a System
Folder
Hi All,
I have a CFileFind object and it is use to list all files/folders in a
folder. Now here goes something wrong.
I created a Folder and it is a IIS folder shown in explorer as
[webicon]Web. But the CFileFind object treat it as a System folder. I
dont know what is wrong with the code and object.
Here is code
CFileFind mFileFinder;
bWorking = mFileFinder.FindFile(mFindPath);
//Enumerating and displaying content of current directory
while (bWorking)
{
bWorking = mFileFinder.FindNextFile();
if (mFileFinder.IsDots())
continue;
if (mFileFinder.IsSystem() || mFileFinder.IsTemporary())
continue; /// Here IIS Folder "c:\web" is considered as system
folder. It is a Default dir for the IIS web site.
if (mFileFinder.IsDirectory())
{
CString str = mFileFinder.GetFilePath();
//GetFileNameOnly(str.MakeLower(),cFileName);
TCHAR s = _T('\\');
int i =str.ReverseFind(s)+1;
str = str.MakeLower();
//uFileList.push_back(str.Right(str.GetLength()-i));
//uFileList.push_back(cFileName);
//m_oDirectoryList.InsertItem(iItem, cFileName, GetIconIndex(str));
}
}