kmail Library API Documentation

kfileio.h

00001 /* Load / save entire (local) files with nice diagnostics dialog messages.
00002  * These functions load/save the whole buffer in one i/o call, so they
00003  * should be pretty efficient.
00004  *
00005  * Author: Stefan Taferner <taferner@kde.org>
00006  * This code is under GPL.
00007  */
00008 #ifndef kfileio_h
00009 #define kfileio_h
00010 
00011 #include <qcstring.h>
00012 
00013 class QString;
00014 
00023 QCString kFileToString(const QString &fileName, bool ensureNewline=true,
00024               bool withDialogs=true);
00025 
00026 QByteArray kFileToBytes(const QString &fileName, bool withDialogs=true);
00027 
00028 
00034 bool kBytesToFile(const char* aBuffer, int len,
00035                   const QString &aFileName,
00036                   bool aAskIfExists, bool aBackup, bool aVerbose);
00037 
00038 bool kCStringToFile(const QCString& buffer, const QString &fileName, 
00039            bool askIfExists=false, bool createBackup=true,
00040            bool withDialogs=true);
00042 bool kByteArrayToFile(const QByteArray& buffer, const QString &fileName, 
00043            bool askIfExists=false, bool createBackup=true,
00044            bool withDialogs=true);
00045 
00046 
00047 #endif /*kfileio_h*/
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:19 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003