1 // FileName.cpp: implementation of the CFileName class.
3 //////////////////////////////////////////////////////////////////////
8 //////////////////////////////////////////////////////////////////////
9 // Construction/Destruction
10 //////////////////////////////////////////////////////////////////////
12 void CFileName::Normalize ()
15 // int isAbsolute = IsFullPath ();
16 // int isUNCPath = IsUNCPath();
20 // minCount = 1; // do not drop the computer during ".." resolution.
22 // // break the path into peaces
23 // CString dir (m_szDir);
24 // CStringList elements;
27 // CString element = SysTokenize (dir, _T("\\/"), n);
31 // if (element == _T(".."))
33 // // drop the last directory if we are not a relative path
34 // if (elements.GetCount () > minCount)
35 // elements.RemoveTail ();
36 // else if (!isAbsolute)
37 // elements.AddTail (element);
39 // else if (element != _T("."))
40 // elements.AddTail (element);
42 // } while( n != -1 );
44 // // resamble the Path
47 // else if (isAbsolute)
52 // POSITION pos = elements.GetHeadPosition ();
53 // while (pos != NULL)
55 // CString element = elements.GetNext(pos);
56 // dir += element + _T("\\");
59 // _tcsncpy (m_szDir, dir, _MAX_DIR);