summaryrefslogtreecommitdiffstats
path: root/src/kvilib/file/kvi_fileutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/file/kvi_fileutils.h')
-rw-r--r--src/kvilib/file/kvi_fileutils.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/kvilib/file/kvi_fileutils.h b/src/kvilib/file/kvi_fileutils.h
index dcead8ae..bea07fed 100644
--- a/src/kvilib/file/kvi_fileutils.h
+++ b/src/kvilib/file/kvi_fileutils.h
@@ -26,8 +26,8 @@
#include "kvi_settings.h"
#include "kvi_string.h"
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <time.h>
@@ -44,55 +44,55 @@
// #warning "or should it be availible only for dirbrowser module ?"
namespace KviFileUtils
{
- //extern KVILIB_API bool readLine(QFile * f,QString &szBuffer,bool bClearBuffer = true);
- //extern KVILIB_API bool loadFileStripCR(const QString &szPath,QString &szBuffer);
+ //extern KVILIB_API bool readLine(TQFile * f,TQString &szBuffer,bool bClearBuffer = true);
+ //extern KVILIB_API bool loadFileStripCR(const TQString &szPath,TQString &szBuffer);
// loads the file at szPath to szBuffer eventually converting from utf8
- extern KVILIB_API bool loadFile(const QString &szPath,QString &szBuffer,bool bUtf8 = true);
- extern KVILIB_API bool loadFile(const char* szPath,QString &szBuffer,bool bUtf8 = true);
+ extern KVILIB_API bool loadFile(const TQString &szPath,TQString &szBuffer,bool bUtf8 = true);
+ extern KVILIB_API bool loadFile(const char* szPath,TQString &szBuffer,bool bUtf8 = true);
// adjusts the file path to the current platform
- extern KVILIB_API void adjustFilePath(QString &szPath);
+ extern KVILIB_API void adjustFilePath(TQString &szPath);
// returns true if szPath points to an existing directory
- extern KVILIB_API bool directoryExists(const QString &szPath);
+ extern KVILIB_API bool directoryExists(const TQString &szPath);
extern KVILIB_API bool directoryExists(const char* path);
// returns true if szPath points to an existing file
- extern KVILIB_API bool fileExists(const QString &szPath);
+ extern KVILIB_API bool fileExists(const TQString &szPath);
extern KVILIB_API bool fileExists(const char* szPath);
// removes a file
- extern KVILIB_API bool removeFile(const QString &szPath);
+ extern KVILIB_API bool removeFile(const TQString &szPath);
extern KVILIB_API bool removeFile(const char* path);
// removes a dir (must be empty)
- extern KVILIB_API bool removeDir(const QString &szPath);
+ extern KVILIB_API bool removeDir(const TQString &szPath);
extern KVILIB_API bool removeDir(const char* path);
// removes a dir recursively
- extern KVILIB_API bool deleteDir(const QString &szPath);
+ extern KVILIB_API bool deleteDir(const TQString &szPath);
// writes a complete file (utf8 version)
- extern KVILIB_API bool writeFile(const QString &szPath,const QString &szData,bool bAppend = false);
- extern KVILIB_API bool writeFile(const char* path,const QString &szData,bool bAppend = false);
+ extern KVILIB_API bool writeFile(const TQString &szPath,const TQString &szData,bool bAppend = false);
+ extern KVILIB_API bool writeFile(const char* path,const TQString &szData,bool bAppend = false);
// writes a complete file (local 8 bit version)
- extern KVILIB_API bool writeFileLocal8Bit(const QString &szPath,const QString &szData,bool bAppend = false);
- extern KVILIB_API bool writeFileLocal8Bit(const char* path,const QString &szData,bool bAppend = false);
+ extern KVILIB_API bool writeFileLocal8Bit(const TQString &szPath,const TQString &szData,bool bAppend = false);
+ extern KVILIB_API bool writeFileLocal8Bit(const char* path,const TQString &szData,bool bAppend = false);
// reads a complete file and puts it in the string szBuffer, if the file is smaller than uMaxSize bytes
- extern KVILIB_API bool readFile(const QString &szPath,QString &szBuffer,unsigned int uMaxSize = 65535);
- extern KVILIB_API bool readFile(const char* path,QString &szBuffer,unsigned int uMaxSize = 65535);
+ extern KVILIB_API bool readFile(const TQString &szPath,TQString &szBuffer,unsigned int uMaxSize = 65535);
+ extern KVILIB_API bool readFile(const char* path,TQString &szBuffer,unsigned int uMaxSize = 65535);
// extracts the filename from a complete path (strips leading path)
- extern KVILIB_API QString extractFileName(const QString &szFileNameWithPath);
+ extern KVILIB_API TQString extractFileName(const TQString &szFileNameWithPath);
- extern KVILIB_API QString extractFilePath(const QString &szFileNameWithPath);
+ extern KVILIB_API TQString extractFilePath(const TQString &szFileNameWithPath);
// cp -f
- extern KVILIB_API bool copyFile(const QString &szSrc,const QString &szDst);
+ extern KVILIB_API bool copyFile(const TQString &szSrc,const TQString &szDst);
extern KVILIB_API bool copyFile(const char* src,const char* dst);
// mv
- extern KVILIB_API bool renameFile(const QString &szSrc,const QString &szDst);
+ extern KVILIB_API bool renameFile(const TQString &szSrc,const TQString &szDst);
extern KVILIB_API bool renameFile(const char* src,const char* dst);
// mkdir
- extern KVILIB_API bool makeDir(const QString &szPath);
+ extern KVILIB_API bool makeDir(const TQString &szPath);
extern KVILIB_API bool makeDir(const char* path);
// reads a text line, returns false if EOF is reached
- extern KVILIB_API bool readLine(QFile * f,QString &szBuffer,bool bUtf8 = true);
- extern KVILIB_API bool readLines(QFile * f,QStringList &buffer,int iStartLine = 0, int iCount = -1, bool bUtf8 = true);
- extern KVILIB_API bool isReadable(const QString &szFname);
- extern KVILIB_API bool isAbsolutePath(const QString &szPath);
+ extern KVILIB_API bool readLine(TQFile * f,TQString &szBuffer,bool bUtf8 = true);
+ extern KVILIB_API bool readLines(TQFile * f,TQStringList &buffer,int iStartLine = 0, int iCount = -1, bool bUtf8 = true);
+ extern KVILIB_API bool isReadable(const TQString &szFname);
+ extern KVILIB_API bool isAbsolutePath(const TQString &szPath);
};
// ALL THIS STUFF BELOW SHOULD DIE: IF YOU SEE IT, REPLACE WITH THE FUNCTIONS IN THE NAMESPACE ABOVE
@@ -103,10 +103,10 @@ KVILIB_API extern bool kvi_isAbsolutePath(const char *path);
// There is NO way to come back to the original string
// the algo is one-way only
KVILIB_API extern void kvi_encodeFileName(KviStr & path);
-KVILIB_API extern void kvi_encodeFileName(QString & path);
+KVILIB_API extern void kvi_encodeFileName(TQString & path);
// Reads a single line from the file and returns false if EOF was encountered.
-KVILIB_API extern bool kvi_readLine(QFile *f,KviStr &str);
+KVILIB_API extern bool kvi_readLine(TQFile *f,KviStr &str);
// Removes a file
#endif //_KVI_FILEUTILS_H_INCLUDED_