kpimutils
kfileio.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KPIMUTILS_KFILEIO_H
00022 #define KPIMUTILS_KFILEIO_H
00023
00024 #include "kpimutils_export.h"
00025
00026 class QByteArray;
00027 class QString;
00028 class QWidget;
00029
00030 namespace KPIMUtils {
00031
00044 KPIMUTILS_EXPORT QByteArray kFileToByteArray( const QString & fileName,
00045 bool ensureNewline = true,
00046 bool withDialogs = true );
00047
00064 KPIMUTILS_EXPORT bool kByteArrayToFile( const QByteArray & buffer,
00065 const QString & fileName,
00066 bool askIfExists = false,
00067 bool createBackup = true,
00068 bool withDialogs = true );
00069
00089 KPIMUTILS_EXPORT QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
00090 const bool recursive,
00091 const bool wantItReadable,
00092 const bool wantItWritable );
00093
00118 KPIMUTILS_EXPORT bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( QWidget *parent,
00119 const QString &toCheck,
00120 const bool recursive,
00121 const bool wantItReadable,
00122 const bool wantItWritable );
00123
00124
00134 KPIMUTILS_EXPORT bool removeDirAndContentsRecursively( const QString & path );
00135
00136 }
00137
00138 #endif