Example program to use JSYSTEM::ls.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JSystem/JFilesystem.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to use JSYSTEM::ls. 
- Author
 - mdejong 
 
Definition in file JLs.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int |           argc,  | 
        
        
           | 
           | 
          char ** |           argv ) | 
        
      
 
Definition at line 16 of file JLs.cc.
   17{
   20 
   22 
   23  try {
   24 
   25    JParser<> zap(
"Example program to mimic shell ls command");
 
   26 
   28 
   29    zap(argc, argv);
   30  }
   31  catch(const exception &error) {
   32    FATAL(error.what() << endl);
 
   33  }
   34 
   35  string option;
   36 
   37  for (int i = 1; i != argc; ++i) {
   38    option += " ";
   39    option += argv[i];
   40  }
   41 
   42  ls buffer(option.c_str());
 
   43  
   44  for (ls::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
   45    cout << *i << endl;
   46  }
   47}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary data structure to list files in directory.