//---------------------------------------------------------------------------

#ifndef Unit2H
#define Unit2H
#include <vcl.h>
#include <dir.h>
//---------------------------------------------------------------------------
class TLogFile
{
  private :
    TFileStream * LogFile;
    void __fastcall WriteComment(void);

  public :

  TLogFile()
    {
      char *ch;
      ch = searchpath("LogFile.txt");
      if ( ch != NULL )
        LogFile = new TFileStream("LogFile.txt",fmOpenReadWrite);
      else
        LogFile = new TFileStream("LogFile.txt",fmOpenReadWrite|fmCreate);
    }

    TLogFile(AnsiString FileName)
    {
      char *ch;
      ch = searchpath(FileName.c_str());
      if ( ch != NULL )
        LogFile = new TFileStream(FileName.c_str(),fmOpenReadWrite);
      else
        LogFile = new TFileStream(FileName.c_str(),fmOpenReadWrite|fmCreate);
    }

  ~TLogFile()
    {
      if ( LogFile != NULL )
        delete LogFile;
    }
  void __fastcall WriteNavigation ( AnsiString Url );
  void __fastcall WriteListParser ( AnsiString Msg );
};
//---------------------------------------------------------------------------
#endif
