• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
netaccess.cpp
1 /* $Id$
2 
3  This file is part of the KDE libraries
4  Copyright (C) 1997 Torben Weis (weis@kde.org)
5  Copyright (C) 1998 Matthias Ettrich (ettrich@kde.org)
6  Copyright (C) 1999 David Faure (faure@kde.org)
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <signal.h>
27 #include <unistd.h>
28 
29 #include <cstring>
30 
31 #include <tqstring.h>
32 #include <tqapplication.h>
33 #include <tqfile.h>
34 #include <tqmetaobject.h>
35 
36 #include <kapplication.h>
37 #include <klocale.h>
38 #include <ktempfile.h>
39 #include <kdebug.h>
40 #include <kurl.h>
41 #include <kio/job.h>
42 #include <kio/scheduler.h>
43 
44 #include "kio/netaccess.h"
45 
46 using namespace KIO;
47 
48 TQString * NetAccess::lastErrorMsg;
49 int NetAccess::lastErrorCode = 0;
50 TQStringList* NetAccess::tmpfiles;
51 
52 bool NetAccess::download(const KURL& u, TQString & target)
53 {
54  return NetAccess::download (u, target, 0);
55 }
56 
57 bool NetAccess::download(const KURL& u, TQString & target, TQWidget* window)
58 {
59  if (u.isLocalFile()) {
60  // file protocol. We do not need the network
61  target = u.path();
62  bool accessible = checkAccess(target, R_OK);
63  if(!accessible)
64  {
65  if(!lastErrorMsg)
66  lastErrorMsg = new TQString;
67  *lastErrorMsg = i18n("File '%1' is not readable").arg(target);
68  lastErrorCode = ERR_COULD_NOT_READ;
69  }
70  return accessible;
71  }
72 
73  if (target.isEmpty())
74  {
75  KTempFile tmpFile;
76  target = tmpFile.name();
77  if (!tmpfiles)
78  tmpfiles = new TQStringList;
79  tmpfiles->append(target);
80  }
81 
82  NetAccess kioNet;
83  KURL dest;
84  dest.setPath( target );
85  return kioNet.filecopyInternal( u, dest, -1, true /*overwrite*/,
86  false, window, false /*copy*/);
87 }
88 
89 bool NetAccess::upload(const TQString& src, const KURL& target)
90 {
91  return NetAccess::upload(src, target, 0);
92 }
93 
94 bool NetAccess::upload(const TQString& src, const KURL& target, TQWidget* window)
95 {
96  if (target.isEmpty())
97  return false;
98 
99  // If target is local... well, just copy. This can be useful
100  // when the client code uses a temp file no matter what.
101  // Let's make sure it's not the exact same file though
102  if (target.isLocalFile() && target.path() == src)
103  return true;
104 
105  NetAccess kioNet;
106  KURL s;
107  s.setPath(src);
108  return kioNet.filecopyInternal( s, target, -1, true /*overwrite*/,
109  false, window, false /*copy*/ );
110 }
111 
112 bool NetAccess::copy( const KURL & src, const KURL & target )
113 {
114  return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, 0L );
115 }
116 
117 bool NetAccess::copy( const KURL & src, const KURL & target, TQWidget* window )
118 {
119  return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, window );
120 }
121 
122 bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
123  bool overwrite, bool resume, TQWidget* window )
124 {
125  NetAccess kioNet;
126  return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
127  window, false /*copy*/ );
128 }
129 
130 
131 bool NetAccess::file_move( const KURL& src, const KURL& target, int permissions,
132  bool overwrite, bool resume, TQWidget* window )
133 {
134  NetAccess kioNet;
135  return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
136  window, true /*move*/ );
137 }
138 
139 bool NetAccess::dircopy( const KURL & src, const KURL & target )
140 {
141  return NetAccess::dircopy( src, target, 0 );
142 }
143 
144 bool NetAccess::dircopy( const KURL & src, const KURL & target, TQWidget* window )
145 {
146  KURL::List srcList;
147  srcList.append( src );
148  return NetAccess::dircopy( srcList, target, window );
149 }
150 
151 bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window )
152 {
153  NetAccess kioNet;
154  return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ );
155 }
156 
157 bool NetAccess::move( const KURL& src, const KURL& target, TQWidget* window )
158 {
159  KURL::List srcList;
160  srcList.append( src );
161  return NetAccess::move( srcList, target, window );
162 }
163 
164 bool NetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window )
165 {
166  NetAccess kioNet;
167  return kioNet.dircopyInternal( srcList, target, window, true /*move*/ );
168 }
169 
170 bool NetAccess::exists( const KURL & url )
171 {
172  return NetAccess::exists( url, false, 0 );
173 }
174 
175 bool NetAccess::exists( const KURL & url, TQWidget* window )
176 {
177  return NetAccess::exists( url, false, window );
178 }
179 
180 bool NetAccess::exists( const KURL & url, bool source )
181 {
182  return NetAccess::exists( url, source, 0 );
183 }
184 
185 bool NetAccess::exists( const KURL & url, bool source, TQWidget* window )
186 {
187  if ( url.isLocalFile() )
188  return TQFile::exists( url.path() );
189  NetAccess kioNet;
190  return kioNet.statInternal( url, 0 /*no details*/, source, window );
191 }
192 
193 bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry )
194 {
195  return NetAccess::stat( url, entry, 0 );
196 }
197 
198 bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, TQWidget* window )
199 {
200  NetAccess kioNet;
201  bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window );
202  if (ret)
203  entry = kioNet.m_entry;
204  return ret;
205 }
206 
207 KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window)
208 {
209  if ( url.isLocalFile() )
210  {
211  return url;
212  }
213 
214  KIO::UDSEntry entry;
215  if (!stat(url, entry, window))
216  {
217  return url;
218  }
219 
220  TQString path;
221 
222  // Extract the local path from the KIO::UDSEntry
223  KIO::UDSEntry::ConstIterator it = entry.begin();
224  const KIO::UDSEntry::ConstIterator end = entry.end();
225  for ( ; it != end; ++it )
226  {
227  if ( (*it).m_uds == KIO::UDS_LOCAL_PATH )
228  {
229  path = (*it).m_str;
230  break;
231  }
232  }
233 
234  if ( !path.isEmpty() )
235  {
236  KURL new_url;
237  new_url.setPath(path);
238  return new_url;
239  }
240 
241  return url;
242 }
243 
244 
245 bool NetAccess::del( const KURL & url )
246 {
247  return NetAccess::del( url, 0 );
248 }
249 
250 bool NetAccess::del( const KURL & url, TQWidget* window )
251 {
252  NetAccess kioNet;
253  return kioNet.delInternal( url, window );
254 }
255 
256 bool NetAccess::mkdir( const KURL & url, int permissions )
257 {
258  return NetAccess::mkdir( url, 0, permissions );
259 }
260 
261 bool NetAccess::mkdir( const KURL & url, TQWidget* window, int permissions )
262 {
263  NetAccess kioNet;
264  return kioNet.mkdirInternal( url, permissions, window );
265 }
266 
267 TQString NetAccess::fish_execute( const KURL & url, const TQString command, TQWidget* window )
268 {
269  NetAccess kioNet;
270  return kioNet.fish_executeInternal( url, command, window );
271 }
272 
273 bool NetAccess::synchronousRun( Job* job, TQWidget* window, TQByteArray* data,
274  KURL* finalURL, TQMap<TQString, TQString>* metaData )
275 {
276  NetAccess kioNet;
277  return kioNet.synchronousRunInternal( job, window, data, finalURL, metaData );
278 }
279 
280 TQString NetAccess::mimetype( const KURL& url )
281 {
282  NetAccess kioNet;
283  return kioNet.mimetypeInternal( url, 0 );
284 }
285 
286 TQString NetAccess::mimetype( const KURL& url, TQWidget* window )
287 {
288  NetAccess kioNet;
289  return kioNet.mimetypeInternal( url, window );
290 }
291 
292 void NetAccess::removeTempFile(const TQString& name)
293 {
294  if (!tmpfiles)
295  return;
296  if (tmpfiles->contains(name))
297  {
298  unlink(TQFile::encodeName(name));
299  tmpfiles->remove(name);
300  }
301 }
302 
303 bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permissions,
304  bool overwrite, bool resume, TQWidget* window, bool move)
305 {
306  bJobOK = true; // success unless further error occurs
307 
308  KIO::Scheduler::checkSlaveOnHold(true);
309  KIO::Job * job = move
310  ? KIO::file_move( src, target, permissions, overwrite, resume )
311  : KIO::file_copy( src, target, permissions, overwrite, resume );
312  job->setWindow (window);
313  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
314  this, TQT_SLOT( slotResult (KIO::Job *) ) );
315 
316  enter_loop();
317  return bJobOK;
318 }
319 
320 bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
321  TQWidget* window, bool move)
322 {
323  bJobOK = true; // success unless further error occurs
324 
325  KIO::Job * job = move
326  ? KIO::move( src, target )
327  : KIO::copy( src, target );
328  job->setWindow (window);
329  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
330  this, TQT_SLOT( slotResult (KIO::Job *) ) );
331 
332  enter_loop();
333  return bJobOK;
334 }
335 
336 bool NetAccess::statInternal( const KURL & url, int details, bool source,
337  TQWidget* window )
338 {
339  bJobOK = true; // success unless further error occurs
340  KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() );
341  job->setWindow (window);
342  job->setDetails( details );
343  job->setSide( source );
344  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
345  this, TQT_SLOT( slotResult (KIO::Job *) ) );
346  enter_loop();
347  return bJobOK;
348 }
349 
350 bool NetAccess::delInternal( const KURL & url, TQWidget* window )
351 {
352  bJobOK = true; // success unless further error occurs
353  KIO::Job * job = KIO::del( url );
354  job->setWindow (window);
355  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
356  this, TQT_SLOT( slotResult (KIO::Job *) ) );
357  enter_loop();
358  return bJobOK;
359 }
360 
361 bool NetAccess::mkdirInternal( const KURL & url, int permissions,
362  TQWidget* window )
363 {
364  bJobOK = true; // success unless further error occurs
365  KIO::Job * job = KIO::mkdir( url, permissions );
366  job->setWindow (window);
367  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
368  this, TQT_SLOT( slotResult (KIO::Job *) ) );
369  enter_loop();
370  return bJobOK;
371 }
372 
373 TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window )
374 {
375  bJobOK = true; // success unless further error occurs
376  m_mimetype = TQString::fromLatin1("unknown");
377  KIO::Job * job = KIO::mimetype( url );
378  job->setWindow (window);
379  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
380  this, TQT_SLOT( slotResult (KIO::Job *) ) );
381  connect( job, TQT_SIGNAL( mimetype (KIO::Job *, const TQString &) ),
382  this, TQT_SLOT( slotMimetype (KIO::Job *, const TQString &) ) );
383  enter_loop();
384  return m_mimetype;
385 }
386 
387 void NetAccess::slotMimetype( KIO::Job *, const TQString & type )
388 {
389  m_mimetype = type;
390 }
391 
392 TQString NetAccess::fish_executeInternal(const KURL & url, const TQString command, TQWidget* window)
393 {
394  TQString target, remoteTempFileName, resultData;
395  KURL tempPathUrl;
396  KTempFile tmpFile;
397  tmpFile.setAutoDelete( true );
398 
399  if( url.protocol() == "fish" )
400  {
401  // construct remote temp filename
402  tempPathUrl = url;
403  remoteTempFileName = tmpFile.name();
404  // only need the filename KTempFile adds some KDE specific dirs
405  // that probably does not exist on the remote side
406  int pos = remoteTempFileName.findRev('/');
407  remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1);
408  tempPathUrl.setPath( remoteTempFileName );
409  bJobOK = true; // success unless further error occurs
410  TQByteArray packedArgs;
411  TQDataStream stream( packedArgs, IO_WriteOnly );
412 
413  stream << int('X') << tempPathUrl << command;
414 
415  KIO::Job * job = KIO::special( tempPathUrl, packedArgs, true );
416  job->setWindow( window );
417  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
418  this, TQT_SLOT( slotResult (KIO::Job *) ) );
419  enter_loop();
420 
421  // since the KIO::special does not provide feedback we need to download the result
422  if( NetAccess::download( tempPathUrl, target, window ) )
423  {
424  TQFile resultFile( target );
425 
426  if (resultFile.open( IO_ReadOnly ))
427  {
428  TQTextStream ts( &resultFile );
429  ts.setEncoding( TQTextStream::Locale ); // Locale??
430  resultData = ts.read();
431  resultFile.close();
432  NetAccess::del( tempPathUrl, window );
433  }
434  }
435  }
436  else
437  {
438  resultData = i18n( "ERROR: Unknown protocol '%1'" ).arg( url.protocol() );
439  }
440  return resultData;
441 }
442 
443 bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
444  KURL* finalURL, TQMap<TQString,TQString>* metaData )
445 {
446  job->setWindow( window );
447 
448  m_metaData = metaData;
449  if ( m_metaData ) {
450  for ( TQMap<TQString, TQString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
451  job->addMetaData( it.key(), it.data() );
452  }
453  }
454 
455  if ( finalURL ) {
456  SimpleJob *sj = dynamic_cast<SimpleJob*>( job );
457  if ( sj ) {
458  m_url = sj->url();
459  }
460  }
461 
462  connect( job, TQT_SIGNAL( result (KIO::Job *) ),
463  this, TQT_SLOT( slotResult (KIO::Job *) ) );
464 
465  TQMetaObject *meta = job->metaObject();
466 
467  static const char dataSignal[] = "data(KIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)";
468  if ( meta->findSignal( dataSignal ) != -1 ) {
469  connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
470  this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
471  }
472 
473  static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)";
474  if ( meta->findSignal( redirSignal ) != -1 ) {
475  connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)),
476  this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) );
477  }
478 
479  enter_loop();
480 
481  if ( finalURL )
482  *finalURL = m_url;
483  if ( data )
484  *data = m_data;
485 
486  return bJobOK;
487 }
488 
489 // If a troll sees this, he kills me
490 void qt_enter_modal( TQWidget *widget );
491 void qt_leave_modal( TQWidget *widget );
492 
493 void NetAccess::enter_loop()
494 {
495  TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
496  dummy.setFocusPolicy( TQ_NoFocus );
497  qt_enter_modal(&dummy);
498  tqApp->enter_loop();
499  qt_leave_modal(&dummy);
500 }
501 
502 void NetAccess::slotResult( KIO::Job * job )
503 {
504  lastErrorCode = job->error();
505  bJobOK = !job->error();
506  if ( !bJobOK )
507  {
508  if ( !lastErrorMsg )
509  lastErrorMsg = new TQString;
510  *lastErrorMsg = job->errorString();
511  }
512  if ( job->isA("KIO::StatJob") )
513  m_entry = static_cast<KIO::StatJob *>(job)->statResult();
514 
515  if ( m_metaData )
516  *m_metaData = job->metaData();
517 
518  tqApp->exit_loop();
519 }
520 
521 void NetAccess::slotData( KIO::Job*, const TQByteArray& data )
522 {
523  if ( data.isEmpty() )
524  return;
525 
526  unsigned offset = m_data.size();
527  m_data.resize( offset + data.size() );
528  std::memcpy( m_data.data() + offset, data.data(), data.size() );
529 }
530 
531 void NetAccess::slotRedirection( KIO::Job*, const KURL& url )
532 {
533  m_url = url;
534 }
535 
536 #include "netaccess.moc"
KIO::SimpleJob::url
const KURL & url() const
Returns the SimpleJob&#39;s URL.
Definition: jobclasses.h:549
KIO::NetAccess::move
static bool move(const KURL &src, const KURL &target, TQWidget *window=0L)
Full-fledged equivalent of KIO::move.
Definition: netaccess.cpp:157
KIO::NetAccess
Net Transparency.
Definition: netaccess.h:59
KIO::UDS_LOCAL_PATH
A local file path if the ioslave display files sitting on the local filesystem (but in another hierar...
Definition: global.h:337
KIO::Job::metaData
MetaData metaData() const
Get meta data received from the slave.
Definition: job.cpp:388
KIO
A namespace for KIO globals.
Definition: authinfo.h:29
KIO::Scheduler::checkSlaveOnHold
static void checkSlaveOnHold(bool b)
When true, the next job will check whether KLauncher has a slave on hold that is suitable for the job...
Definition: scheduler.h:280
KIO::StatJob::setSide
void setSide(bool source)
A stat() can have two meanings.
Definition: jobclasses.h:709
KIO::NetAccess::exists
static bool exists(const KURL &url, bool source, TQWidget *window)
Tests whether a URL exists.
Definition: netaccess.cpp:185
KIO::StatJob
A KIO job that retrieves information about a file or directory.
Definition: jobclasses.h:688
KIO::NetAccess::mkdir
static bool mkdir(const KURL &url, TQWidget *window, int permissions=-1)
Creates a directory in a synchronous way.
Definition: netaccess.cpp:261
KIO::file_copy
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.
Definition: job.cpp:1963
KIO::Job::setWindow
void setWindow(TQWidget *window)
Associate this job with a window given by window.
Definition: job.cpp:352
KIO::NetAccess::stat
static bool stat(const KURL &url, KIO::UDSEntry &entry, TQWidget *window)
Tests whether a URL exists and return information on it.
Definition: netaccess.cpp:198
KIO::NetAccess::fish_execute
static TQString fish_execute(const KURL &url, const TQString command, TQWidget *window)
Executes a remote process via the fish ioslave in a synchronous way.
Definition: netaccess.cpp:267
KIO::NetAccess::upload
static bool upload(const TQString &src, const KURL &target, TQWidget *window)
Uploads file src to URL target.
Definition: netaccess.cpp:94
KIO::move
KIO_EXPORT CopyJob * move(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Moves a file or directory src to the given destination dest.
Definition: job.cpp:3908
KIO::mimetype
KIO_EXPORT MimetypeJob * mimetype(const KURL &url, bool showProgressInfo=true)
Find mimetype for one file or directory.
Definition: job.cpp:1509
KIO::UDSEntry
TQValueList< UDSAtom > UDSEntry
An entry is the list of atoms containing all the information for a file or URL.
Definition: global.h:506
KIO::special
KIO_EXPORT SimpleJob * special(const KURL &url, const TQByteArray &data, bool showProgressInfo=true)
Execute any command that is specific to one slave (protocol).
Definition: job.cpp:786
KIO::NetAccess::synchronousRun
static bool synchronousRun(Job *job, TQWidget *window, TQByteArray *data=0, KURL *finalURL=0, TQMap< TQString, TQString > *metaData=0)
This function executes a job in a synchronous way.
Definition: netaccess.cpp:273
KIO::copy
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...
Definition: job.cpp:3886
KIO::Job::addMetaData
void addMetaData(const TQString &key, const TQString &value)
Add key/value pair to the meta data that is sent to the slave.
Definition: job.cpp:405
KIO::NetAccess::removeTempFile
static void removeTempFile(const TQString &name)
Removes the specified file if and only if it was created by KIO::NetAccess as a temporary file for a ...
Definition: netaccess.cpp:292
KIO::NetAccess::download
static bool download(const KURL &src, TQString &target, TQWidget *window)
Downloads a file from an arbitrary URL (src) to a temporary file on the local filesystem (target)...
Definition: netaccess.cpp:57
KIO::NetAccess::del
static bool del(const KURL &url, TQWidget *window)
Deletes a file or a directory in a synchronous way.
Definition: netaccess.cpp:250
KIO::Job::errorString
TQString errorString() const
Converts an error code and a non-i18n error message into an error message in the current language...
Definition: global.cpp:225
KIO::stat
KIO_EXPORT StatJob * stat(const KURL &url, bool showProgressInfo=true)
Find all details for one file or directory.
Definition: job.cpp:886
KIO::file_move
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.
Definition: job.cpp:1969
KIO::NetAccess::file_move
static bool file_move(const KURL &src, const KURL &target, int permissions=-1, bool overwrite=false, bool resume=false, TQWidget *window=0L)
Full-fledged equivalent of KIO::file_move.
Definition: netaccess.cpp:131
KIO::del
KIO_EXPORT DeleteJob * del(const KURL &src, bool shred=false, bool showProgressInfo=true)
Delete a file or directory.
Definition: job.cpp:4386
KIO::NetAccess::copy
static bool copy(const KURL &src, const KURL &target, TQWidget *window)
Alternative to upload for copying over the network.
Definition: netaccess.cpp:117
KIO::NetAccess::mostLocalURL
static KURL mostLocalURL(const KURL &url, TQWidget *window)
Tries to map a local URL for the given URL.
Definition: netaccess.cpp:207
KIO::StatJob::setDetails
void setDetails(short int details)
Selects the level of details we want.
Definition: jobclasses.h:720
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:68
KIO::NetAccess::dircopy
static bool dircopy(const KURL &src, const KURL &target, TQWidget *window)
Alternative method for copying over the network.
Definition: netaccess.cpp:144
KIO::NetAccess::file_copy
static bool file_copy(const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, TQWidget *window=0L)
Full-fledged equivalent of KIO::file_copy.
Definition: netaccess.cpp:122
KIO::mkdir
KIO_EXPORT SimpleJob * mkdir(const KURL &url, int permissions=-1)
Creates a single directory.
Definition: job.cpp:751
KIO::Job::error
int error() const
Returns the error code, if there has been an error.
Definition: jobclasses.h:95
KIO::SimpleJob
A simple job (one url and one command).
Definition: jobclasses.h:528

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |