Changeset 100 for trunk/lib/Directory.cc


Ignore:
Timestamp:
Jun 19, 2006, 11:53:16 AM (15 years ago)
Author:
Peter Johansson
Message:

closes #9 and move create function from svnstat.cc to lib/utility and also move rmdirhier to lib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r91 r100  
    2626#include "Node.h"
    2727#include "SVN.h"
     28#include "utility.h"
    2829
    2930#include <algorithm>
     
    6869          lstat(fullpath.c_str(),&nodestat);   // C api from sys/stat.h
    6970          if (S_ISDIR(nodestat.st_mode))       // C api from sys/stat.h
    70             daughters_.push_back(new Directory(fullpath, output_name()+"_"));
     71            daughters_.push_back(new Directory(fullpath, output_name()+"/"));
    7172          else
    72             daughters_.push_back(new File(fullpath,output_name()+"_"));
     73            daughters_.push_back(new File(fullpath,output_name()+"/"));
    7374          break;
    7475        case SVN::unresolved:
     
    8687  }
    8788
     89  std::string Directory::html_link(void) const
     90  {
     91    return "<a href=\"" + name() + "/index.html\">" + name() + "</a>";
     92  }
    8893
    8994  const Stats& Directory::parse(const bool verbose)
     
    100105  void Directory::print(const bool verbose) const
    101106  {
    102     std::string output(output_name() + ".html");
     107    createdir(output_name());
     108    std::string output(output_name() + "/index.html");
    103109    if (verbose)
    104110      std::cout << "Printing output for " << path_ << std::endl;
    105111    std::ofstream os(output.c_str());
    106112    print_header(os);
    107     os << "<p align=center>\n<img src='" << stats_.plot(output_name()+".png")
     113    os << "<p align=center>\n<img src='"
     114       << file_name(stats_.plot(output_name()+"/index.png"))
    108115       << "' alt='[plot]' border=0><br>\n";
    109116    os << "<table>\n";
Note: See TracChangeset for help on using the changeset viewer.