This is the verbatim text of the qfile.h include file. It is is provided only for illustration; the copyright remains with Troll Tech


/****************************************************************************
** $Id: qfile.h,v 2.1 1997/08/06 15:05:51 hanord Exp $
**
** Definition of QFile class
**
** Created : 930831
**
** Copyright (C) 1993-1997 by Troll Tech AS.  All rights reserved.
**
*****************************************************************************/

#ifndef QFILE_H
#define QFILE_H

#include "qiodev.h"
#include "qstring.h"
#include <stdio.h>

class QDir;


class QFile : public QIODevice                  // file I/O device class
{
public:
    QFile();
    QFile( const char *name );
   ~QFile();

    const char *name()  const;
    void        setName( const char *name );

    bool        exists()   const;
    static bool exists( const char *fileName );

    bool        open( int );
    bool        open( int, FILE * );
    bool        open( int, int );
    void        close();
    void        flush();

    uint        size()  const;
    int         at()    const;
    bool        at( int );
    bool        atEnd() const;

    int         readBlock( char *data, uint len );
    int         writeBlock( const char *data, uint len );
    int         readLine( char *data, uint maxlen );

    int         getch();
    int         putch( int );
    int         ungetch( int );

    int         handle() const;

protected:
    QString     fn;
    FILE       *fh;
    int         fd;
    int         length;
    bool        ext_f;

private:
    void        init();

private:        // Disabled copy constructor and operator=
    QFile( const QFile & ) {}
    QFile &operator=( const QFile & ) { return *this; }
};


inline const char *QFile::name() const
{ return fn; }

inline int QFile::at() const
{ return index; }


#endif // QFILE_H


Generated at 19:08, 1997/10/09 for Qt version 1.31 by the webmaster at Troll Tech