1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
From WebMaker - KDE HTML Editor
Copyright (C) 1998, 1999 Alexei Dets <[email protected]>
Rewritten for Quanta Plus: (C) 2002 Andras Mantia <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
#ifndef _QEXTFILEINFO_H_
#define _QEXTFILEINFO_H_
#include <kio/global.h>
#include <kio/job.h>
#include <kurl.h>
#include <kfileitem.h>
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqregexp.h>
class QExtFileInfo:public QObject
{
Q_OBJECT
public:
QExtFileInfo() {};
~QExtFileInfo() {};
/** create to ralative short name */
static KURL toRelative(const KURL& urlToConvert,const KURL& baseURL);
/** convert relative filename to absolute */
static KURL toAbsolute(const KURL& urlToConvert,const KURL& baseURL);
/** recurse function for all files in dir */
static KURL::List allFiles( const KURL& path, const TQString &mask);
static KURL::List allFilesRelative( const KURL& path, const TQString &mask);
/** create dir if don't exists */
static bool createDir(const KURL & path );
static KURL cdUp(const KURL &dir);
static TQString shortName(const TQString &fname );
static KURL path(const KURL &);
static KURL home();
static bool exists(const KURL& url);
static bool copy( const KURL& src, const KURL& dest, int permissions=-1,
bool overwrite=false, bool resume=false, TQWidget* window = 0L );
void enter_loop();
private:
bool internalExists(const KURL& url);
bool internalCopy(const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window);
bool bJobOK;
static TQString lastErrorMsg;
KIO::UDSEntry m_entry;
KURL::List dirListItems;
TQPtrList<TQRegExp> lstFilters;
/** No descriptions */
KURL::List allFilesInternal(const KURL& startURL, const TQString& mask);
// friend class I_like_this_class;
private slots:
void slotResult( KIO::Job * job );
void slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList);
public slots: // Public slots
/** Timeout occured while waiting for some network function to return. */
void slotTimeout();
};
#endif
|