Hi List,

Ive found two (evtl. three) Failures:

  * The description of the Directory-class is wrong (
    http://www.tntnet.org/classcxxtools_1_1Directory.html, there does'nt
    exist an element "iterator" anymore). The corrected variant doesnt
    work reproducable (see attachment example)
  * changing dir with chdir-method doesnt work (have no effect, takes
    always the init-value)
  * Possibly it would be better taking non-static class-members, because
    there could be exist parallel instances of Directory-class.

For reproducing the problem call  http://localhost:8000 after
compilation and start and have a look at the log.

Regards
Oliver

<%pre>
#include <cxxtools/posix/commandoutput.h>
#include <cxxtools/directory.h> 

</%pre>
<%args>
// define the query parameters
// bar;
</%args>
<%session>
// define your session scope variables here
// std::string mySessionState;
</%session>
<%cpp>
cxxtools::Directory d("/usr");
cxxtools::DirectoryIterator it = d.begin();
while (it != d.end())
{
    std::cout << "name : " << *it << std::endl;
    ++it;
}
d.chdir("/home");
it = d.begin();
while (it != d.end())
{
    std::cout << "name : " << *it << std::endl;
    ++it;
}
</%cpp>
<html>
 <head>
  <title>ecpp-application dirtest</title>
 </head>
 <body>
  <h1>dirtest</h1>
  <p>Hello world!</p>
 </body>
</html>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to