Changeset 1476 for trunk


Ignore:
Timestamp:
2000-08-31T08:57:08+12:00 (24 years ago)
Author:
sjboddie
Message:

* empty log message *

Location:
trunk/gsdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/fileutil.cpp

    r1456 r1476  
    238238#endif
    239239
    240 // I'm sure there's a better way to do this - for now I don't have
    241 // time to find it though
    242240// returns true if things look like they happened ok
    243241bool file_copy (const text_t &fromfile, const text_t &tofile) {
     
    246244  char *tofilec = tofile.getcstr();
    247245  bool fail = false;
     246
     247#ifdef __WIN32__
     248  if (CopyFile (fromfilec, tofilec, FALSE) == 0) fail = true;
     249
     250#else
     251
     252  // I'm sure there's a better way to do this - for now I don't have
     253  // time to find it though
    248254  ifstream from (fromfilec);
    249255  if (!from) {
     
    265271    }
    266272  }
     273
     274#endif
     275
    267276  delete fromfilec;
    268277  delete tofilec;
     
    270279  return true;
    271280}
    272 
    273 /*
    274 
    275 #ifdef __WIN32__
    276 char *fromfilec = fromfile.getcstr();
    277 char *tofilec = tofile.getcstr();
    278 CopyFile (fromfilec, tofilec, FALSE);
    279 delete fromfilec;
    280 delete tofilec;
    281 
    282 #else
    283 text_t cp_cmd = "cp " + fromfile + " " + tofile;
    284 char *cp_cmdc = cp_cmd.getcstr();
    285 system (cp_cmdc);
    286 delete cp_cmdc;
    287 
    288 #endif
    289 */
    290281
    291282// returns the last line (or last 256 characters)
     
    323314}
    324315
    325 // probably need windows version of this
     316#ifdef __WIN32__
     317
     318#include <direct.h>
     319// returns true if directory was created successfully
     320bool mk_dir (const text_t &dirname) {
     321  char *dirnamec = dirname.getcstr();
     322  int rv = _mkdir (dirnamec);
     323  delete dirnamec;
     324  if (rv == 0) return true;
     325  return false;
     326}
     327
     328#else
     329
    326330#include <sys/stat.h>
    327331#include <sys/types.h>
    328332#include <fcntl.h>
    329333#include <unistd.h>
    330 
    331334// returns true if directory was created successfully
    332335bool mk_dir (const text_t &dirname) {
     
    339342}
    340343
     344#endif
  • trunk/gsdl/macros/collect.dm

    r1455 r1476  
    225225<tr><td align=right valign=bottom>2.</td>
    226226<td valign=bottom>_gsjimage_(_,_collector:httpicongcconfof_,_collector:httpicongcconfon_,conf,_collector:textconf_)</td>
    227 <td valign=bottom>Edit the collection configuration file</td></tr>
     227<td valign=bottom>Edit the collection configuration file and rebuild the collection</td></tr>
    228228<tr><td align=right valign=bottom>3.</td>
    229229<td valign=bottom>_gsimage_(_collector:httpdel_,_collector:httpicongcdelof_,_collector:httpicongcdelon_,del,_collector:textdel_)</td>
     
    750750function count_down() \{
    751751  if (timer==0) \{
     752    window.status = "";
    752753    document.collectorform.submit();
    753754  \} else \{
Note: See TracChangeset for help on using the changeset viewer.