home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / rjs.lha / RJS / Directory / tests / qtest.C < prev   
Encoding:
C/C++ Source or Header  |  1991-06-14  |  351 b   |  25 lines

  1.  
  2. #include <RJS/Directory.h>
  3. #include <RJS/RJS.h>
  4.  
  5. #include<libc.h>
  6.  
  7. main( int argc, char **argv)
  8. {
  9.     if (argc!=2) {
  10.         cout << "usage: "<< argv[0] << " dir_name" << endl;
  11.         exit(1);
  12.     }
  13.  
  14.     RJS_Directory dir(argv[1],1);
  15.     if (!dir.ss_ok()) {
  16.         cout << dir.ss_message() << endl;
  17.         exit(1);
  18.     }
  19.  
  20.     String file;
  21.     while (dir.next(file)) cout << file << endl;
  22.  
  23.  
  24. }
  25.