• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

bt::File

bt::File Class Reference

#include <file.h>

List of all members.


Detailed Description

Author:
Joris Guisson

Wrapper class for stdio's FILE

Wrapper class for stdio's FILE.

Definition at line 37 of file file.h.


Public Types

enum  SeekPos { BEGIN, END, CURRENT }

Public Member Functions

void close ()
bool eof () const
QString errorString () const
 File ()
void flush ()
bool open (const QString &file, const QString &mode)
Uint32 read (void *buf, Uint32 size)
Uint64 seek (SeekPos from, Int64 num)
Uint64 tell () const
Uint32 write (const void *buf, Uint32 size)
virtual ~File ()

Member Enumeration Documentation

enum bt::File::SeekPos

Enumerator:
BEGIN 
END 
CURRENT 

Definition at line 88 of file file.h.


Constructor & Destructor Documentation

bt::File::File (  ) 

Constructor.

Definition at line 35 of file file.cpp.

bt::File::~File (  )  [virtual]

Destructor, closes the file.

Definition at line 39 of file file.cpp.


Member Function Documentation

void bt::File::close (  ) 

Close the file.

Definition at line 57 of file file.cpp.

bool bt::File::eof (  )  const

Check to see if we are at the end of the file.

Definition at line 129 of file file.cpp.

QString bt::File::errorString (  )  const

Get the error string.

Definition at line 150 of file file.cpp.

void bt::File::flush (  ) 

Flush the file.

Definition at line 66 of file file.cpp.

bool bt::File::open ( const QString &  file,
const QString &  mode 
)

Open the file similar to fopen.

Parameters:
file Filename
mode Mode
Returns:
true upon succes

Definition at line 44 of file file.cpp.

Uint32 bt::File::read ( void *  buf,
Uint32  size 
)

Read a bunch of data.

If anything goes wrong an Error will be thrown.

Parameters:
buf The buffer to store the data
size Size of the buffer
Returns:
The number of bytes read

Definition at line 88 of file file.cpp.

Uint64 bt::File::seek ( SeekPos  from,
Int64  num 
)

Seek in the file.

Parameters:
from Position to seek from
num Number of bytes to move
Returns:
New position

Definition at line 102 of file file.cpp.

Uint64 bt::File::tell (  )  const

Get the current position in the file.

Definition at line 137 of file file.cpp.

Uint32 bt::File::write ( const void *  buf,
Uint32  size 
)

Write a bunch of data.

If anything goes wrong an Error will be thrown.

Parameters:
buf The data
size Size of the data
Returns:
The number of bytes written

Definition at line 72 of file file.cpp.


The documentation for this class was generated from the following files:
  • file.h
  • file.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal