23 #ifndef __kio_netaccess_h
24 #define __kio_netaccess_h
28 #include <kio/global.h>
33 template<
typename T,
typename K>
class TQMap;
117 static bool download(
const KURL& src, TQString & target, TQWidget* window);
122 static bool download(
const KURL& src, TQString & target) KDE_DEPRECATED;
135 static void removeTempFile(
const TQString& name);
156 static bool upload(
const TQString& src,
const KURL& target, TQWidget* window);
161 static bool upload(
const TQString& src,
const KURL& target) KDE_DEPRECATED;
181 static bool copy(
const KURL& src,
const KURL& target, TQWidget* window );
187 static bool copy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
193 static bool file_copy(
const KURL& src,
const KURL& dest,
int permissions=-1,
194 bool overwrite=
false,
bool resume=
false, TQWidget* window = 0L );
201 static bool file_move(
const KURL& src,
const KURL& target,
int permissions=-1,
202 bool overwrite=
false,
bool resume=
false, TQWidget* window = 0L );
224 static bool dircopy(
const KURL& src,
const KURL& target, TQWidget* window );
229 static bool dircopy(
const KURL& src,
const KURL& target ) KDE_DEPRECATED;
234 static bool dircopy(
const KURL::List& src,
const KURL& target, TQWidget* window = 0L );
241 static bool move(
const KURL& src,
const KURL& target, TQWidget* window = 0L );
248 static bool move(
const KURL::List& src,
const KURL& target, TQWidget* window = 0L );
266 static bool exists(
const KURL& url,
bool source, TQWidget* window);
272 static bool exists(
const KURL& url, TQWidget* window) KDE_DEPRECATED;
277 static bool exists(
const KURL& url) KDE_DEPRECATED;
282 static bool exists(
const KURL& url,
bool source) KDE_DEPRECATED;
323 static KURL mostLocalURL(
const KURL& url, TQWidget* window);
339 static bool del(
const KURL & url, TQWidget* window );
347 static bool del(
const KURL & url ) KDE_DEPRECATED;
364 static bool mkdir(
const KURL & url, TQWidget* window,
int permissions = -1 );
372 static bool mkdir(
const KURL & url,
int permissions = -1 ) KDE_DEPRECATED;
392 static TQString fish_execute(
const KURL & url,
const TQString command, TQWidget* window );
428 static bool synchronousRun(
Job* job, TQWidget* window, TQByteArray* data=0,
429 KURL* finalURL=0, TQMap<TQString,TQString>* metaData=0 );
453 static TQString
mimetype(
const KURL & url, TQWidget* window );
461 static TQString
mimetype(
const KURL & url ) KDE_DEPRECATED;
468 static TQString
lastErrorString() {
return lastErrorMsg ? *lastErrorMsg : TQString::null; }
491 bool filecopyInternal(
const KURL& src,
const KURL& target,
int permissions,
492 bool overwrite,
bool resume, TQWidget* window,
bool move);
493 bool dircopyInternal(
const KURL::List& src,
const KURL& target,
494 TQWidget* window,
bool move);
495 bool statInternal(
const KURL & url,
int details,
bool source, TQWidget* window = 0);
497 bool delInternal(
const KURL & url, TQWidget* window = 0);
498 bool mkdirInternal(
const KURL & url,
int permissions, TQWidget* window = 0);
499 TQString fish_executeInternal(
const KURL & url,
const TQString command, TQWidget* window = 0);
500 bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
501 KURL* finalURL, TQMap<TQString,TQString>* metaData );
503 TQString mimetypeInternal(
const KURL & url, TQWidget* window = 0);
509 static TQStringList* tmpfiles;
511 static TQString* lastErrorMsg;
512 static int lastErrorCode;
514 friend class I_like_this_class;
518 void slotMimetype(
KIO::Job * job,
const TQString & type );
519 void slotData(
KIO::Job*,
const TQByteArray& );
520 void slotRedirection(
KIO::Job*,
const KURL& );
527 TQMap<TQString, TQString> *m_metaData;
535 class NetAccessPrivate* d;
The base class for all jobs.
static int lastError()
Returns the error code for the last job, in case it failed.
static TQString lastErrorString()
Returns the error string for the last job, in case it failed.
A namespace for KIO globals.
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
KIO_EXPORT StatJob * stat(const KURL &url, bool showProgressInfo=true)
Find all details for one file or directory.
KIO_EXPORT MimetypeJob * mimetype(const KURL &url, bool showProgressInfo=true)
Find mimetype for one file or directory.
KIO_EXPORT FileCopyJob * file_move(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
Move a single file.
KIO_EXPORT DeleteJob * del(const KURL &src, bool shred=false, bool showProgressInfo=true)
Delete a file or directory.
KIO_EXPORT FileCopyJob * file_copy(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
Copy a single file.
KIO_EXPORT CopyJob * copy(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Copy a file or directory src into the destination dest, which can be a file (including the final file...
KIO_EXPORT CopyJob * move(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Moves a file or directory src to the given destination dest.
KIO_EXPORT SimpleJob * mkdir(const KURL &url, int permissions=-1)
Creates a single directory.