home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / filesys / fs_demo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-03  |  521 b   |  26 lines

  1.  
  2.  
  3. #include "stdio.h"
  4.  
  5. #include "filesys.h"
  6.  
  7. void
  8. main()
  9. {
  10.     CFileSystem    fs;
  11.     
  12.     CString CurrentDir = fs.GetCurrentDirectory();
  13.     printf("Current Directory = %s\n", (const char *) CurrentDir);
  14.  
  15.     CStringList *pDirList = fs.GetDirectory("*.*", CFileSystem::normal, TRUE);
  16.     printf("\nDirectory Listing:\n");
  17.     for (int i = 0; i < pDirList->GetCount(); i++)
  18.     {
  19.         CString String = pDirList->GetAt(pDirList->FindIndex(i));
  20.         printf("\t%s\n", (const char *) String);
  21.     } // for
  22.  
  23.     delete pDirList;
  24. } // main 
  25.  
  26.