Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef FILE_H
00030 #define FILE_H
00031
00032 #include <zlib.h>
00033 #include <QtCore>
00034
00035 #include "QGpCoreToolsDLLExport.h"
00036
00037 namespace QGpCoreTools {
00038
00039 class QGPCORETOOLS_EXPORT File
00040 {
00041 public:
00042 static QStringList expand(const QStringList& fileNames);
00043 static QStringList expand(const QString& fileName);
00044 static QString uniqueName(QString fileName, const QDir& d);
00045
00046 static char * readAll(const char * fileName);
00047 static bool readLine(char *& buf, int& bufLen, gzFile f, bool delEOL=false);
00048 static bool readLine(char *& buf, int& bufLen, FILE * f, bool delEOL=false);
00049 static QString readLine(FILE * f, bool delEOL=false);
00050 static QString readLine(bool delEOL);
00051 static void readBreakLine(char *& buf, int& bufLen, FILE * f);
00052 static bool readCleanUp(char * buf, bool returnValue);
00053 static void readLineNoComments(char * buf, int& bufLen, FILE * f, QString * comments);
00054 static QString readLineNoComments(QTextStream& s, QString * comments);
00055 static char * stripWhiteSpace(char * buf);
00056 static const char * stripWhiteSpace(const char * buf, int& len);
00057 static char * nextField(char *& buf, const char * sep);
00058 static void getKeyValue(const char * fileNAme, const char * varName, QString& value);
00059
00060 static QStringList getLibList(QStringList pathList);
00061
00062 static qint32 fromBigEndian(qint32 v);
00063 static qint32 fromLittleEndian(qint32 v);
00064 static qint16 fromBigEndian(qint16 v);
00065 static qint16 fromLittleEndian(qint16 v);
00066 private:
00067 static QStringList expand(QDir d, QStringList filters, QString levelName, int level);
00068 };
00069
00070 }
00071
00072 #endif // FILE_H