• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kio
deletejob.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright 2000 Stephan Kulow <coolo@kde.org>
3  Copyright 2000-2009 David Faure <faure@kde.org>
4  Copyright 2000 Waldo Bastian <bastian@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #include "deletejob.h"
23 
24 #include "kdirlister.h"
25 #include "scheduler.h"
26 #include "kdirwatch.h"
27 #include "kprotocolmanager.h"
28 #include "jobuidelegate.h"
29 #include "clipboardupdater_p.h"
30 #include <kdirnotify.h>
31 
32 #include <klocale.h>
33 #include <kdebug.h>
34 #include <kde_file.h>
35 
36 #include <QtCore/QTimer>
37 #include <QtCore/QFile>
38 #include <QPointer>
39 
40 #include "job_p.h"
41 
42 extern bool kio_resolve_local_urls; // from copyjob.cpp, abused here to save a symbol.
43 
44 static bool isHttpProtocol(const QString& protocol)
45 {
46  return (protocol.startsWith(QLatin1String("webdav"), Qt::CaseInsensitive) ||
47  protocol.startsWith(QLatin1String("http"), Qt::CaseInsensitive));
48 }
49 
50 namespace KIO
51 {
52  enum DeleteJobState {
53  DELETEJOB_STATE_STATING,
54  DELETEJOB_STATE_DELETING_FILES,
55  DELETEJOB_STATE_DELETING_DIRS
56  };
57 
58  /*
59  static const char* const s_states[] = {
60  "DELETEJOB_STATE_STATING",
61  "DELETEJOB_STATE_DELETING_FILES",
62  "DELETEJOB_STATE_DELETING_DIRS"
63  };
64  */
65 
66  class DeleteJobPrivate: public KIO::JobPrivate
67  {
68  public:
69  DeleteJobPrivate(const KUrl::List& src)
70  : state( DELETEJOB_STATE_STATING )
71  , m_processedFiles( 0 )
72  , m_processedDirs( 0 )
73  , m_totalFilesDirs( 0 )
74  , m_srcList( src )
75  , m_currentStat( m_srcList.begin() )
76  , m_reportTimer( 0 )
77  {
78  }
79  DeleteJobState state;
80  int m_processedFiles;
81  int m_processedDirs;
82  int m_totalFilesDirs;
83  KUrl m_currentURL;
84  KUrl::List files;
85  KUrl::List symlinks;
86  KUrl::List dirs;
87  KUrl::List m_srcList;
88  KUrl::List::iterator m_currentStat;
89  QSet<QString> m_parentDirs;
90  QTimer *m_reportTimer;
91 
92  void statNextSrc();
93  void currentSourceStated(bool isDir, bool isLink);
94  void finishedStatPhase();
95  void deleteNextFile();
96  void deleteNextDir();
97  void slotReport();
98  void slotStart();
99  void slotEntries( KIO::Job*, const KIO::UDSEntryList& list );
100 
101  Q_DECLARE_PUBLIC(DeleteJob)
102 
103  static inline DeleteJob *newJob(const KUrl::List &src, JobFlags flags)
104  {
105  DeleteJob *job = new DeleteJob(*new DeleteJobPrivate(src));
106  job->setUiDelegate(new JobUiDelegate);
107  if (!(flags & HideProgressInfo))
108  KIO::getJobTracker()->registerJob(job);
109  return job;
110  }
111  };
112 
113 } // namespace KIO
114 
115 using namespace KIO;
116 
117 DeleteJob::DeleteJob(DeleteJobPrivate &dd)
118  : Job(dd)
119 {
120  d_func()->m_reportTimer = new QTimer(this);
121  connect(d_func()->m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
122  //this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX
123  d_func()->m_reportTimer->start( 200 );
124 
125  QTimer::singleShot(0, this, SLOT(slotStart()));
126 }
127 
128 DeleteJob::~DeleteJob()
129 {
130 }
131 
132 KUrl::List DeleteJob::urls() const
133 {
134  return d_func()->m_srcList;
135 }
136 
137 void DeleteJobPrivate::slotStart()
138 {
139  statNextSrc();
140 }
141 
142 void DeleteJobPrivate::slotReport()
143 {
144  Q_Q(DeleteJob);
145  emit q->deleting( q, m_currentURL );
146 
147  // TODO: maybe we could skip everything else when (flags & HideProgressInfo) ?
148  JobPrivate::emitDeleting( q, m_currentURL);
149 
150  switch( state ) {
151  case DELETEJOB_STATE_STATING:
152  q->setTotalAmount(KJob::Files, files.count());
153  q->setTotalAmount(KJob::Directories, dirs.count());
154  break;
155  case DELETEJOB_STATE_DELETING_DIRS:
156  q->setProcessedAmount(KJob::Directories, m_processedDirs);
157  q->emitPercent( m_processedFiles + m_processedDirs, m_totalFilesDirs );
158  break;
159  case DELETEJOB_STATE_DELETING_FILES:
160  q->setProcessedAmount(KJob::Files, m_processedFiles);
161  q->emitPercent( m_processedFiles, m_totalFilesDirs );
162  break;
163  }
164 }
165 
166 
167 void DeleteJobPrivate::slotEntries(KIO::Job* job, const UDSEntryList& list)
168 {
169  UDSEntryList::ConstIterator it = list.begin();
170  const UDSEntryList::ConstIterator end = list.end();
171  for (; it != end; ++it)
172  {
173  const UDSEntry& entry = *it;
174  const QString displayName = entry.stringValue( KIO::UDSEntry::UDS_NAME );
175 
176  Q_ASSERT(!displayName.isEmpty());
177  if (displayName != ".." && displayName != ".")
178  {
179  KUrl url;
180  const QString urlStr = entry.stringValue( KIO::UDSEntry::UDS_URL );
181  if ( !urlStr.isEmpty() )
182  url = urlStr;
183  else {
184  url = static_cast<SimpleJob *>(job)->url(); // assumed to be a dir
185  url.addPath( displayName );
186  }
187 
188  //kDebug(7007) << displayName << "(" << url << ")";
189  if ( entry.isLink() )
190  symlinks.append( url );
191  else if ( entry.isDir() )
192  dirs.append( url );
193  else
194  files.append( url );
195  }
196  }
197 }
198 
199 
200 void DeleteJobPrivate::statNextSrc()
201 {
202  Q_Q(DeleteJob);
203  //kDebug(7007);
204  if (m_currentStat != m_srcList.end()) {
205  m_currentURL = (*m_currentStat);
206 
207  // if the file system doesn't support deleting, we do not even stat
208  if (!KProtocolManager::supportsDeleting(m_currentURL)) {
209  QPointer<DeleteJob> that = q;
210  ++m_currentStat;
211  emit q->warning( q, buildErrorString(ERR_CANNOT_DELETE, m_currentURL.prettyUrl()) );
212  if (that)
213  statNextSrc();
214  return;
215  }
216  // Stat it
217  state = DELETEJOB_STATE_STATING;
218 
219  // Fast path for KFileItems in directory views
220  while(m_currentStat != m_srcList.end()) {
221  m_currentURL = (*m_currentStat);
222  const KFileItem cachedItem = KDirLister::cachedItemForUrl(m_currentURL);
223  if (cachedItem.isNull())
224  break;
225  //kDebug(7007) << "Found cached info about" << m_currentURL << "isDir=" << cachedItem.isDir() << "isLink=" << cachedItem.isLink();
226  currentSourceStated(cachedItem.isDir(), cachedItem.isLink());
227  ++m_currentStat;
228  }
229 
230  // Hook for unit test to disable the fast path.
231  if (!kio_resolve_local_urls) {
232 
233  // Fast path for local files
234  // (using a loop, instead of a huge recursion)
235  while(m_currentStat != m_srcList.end() && (*m_currentStat).isLocalFile()) {
236  m_currentURL = (*m_currentStat);
237  QFileInfo fileInfo(m_currentURL.toLocalFile());
238  currentSourceStated(fileInfo.isDir(), fileInfo.isSymLink());
239  ++m_currentStat;
240  }
241  }
242  if (m_currentStat == m_srcList.end()) {
243  // Done, jump to the last else of this method
244  statNextSrc();
245  } else {
246  KIO::SimpleJob * job = KIO::stat( m_currentURL, StatJob::SourceSide, 0, KIO::HideProgressInfo );
247  Scheduler::setJobPriority(job, 1);
248  //kDebug(7007) << "stat'ing" << m_currentURL;
249  q->addSubjob(job);
250  }
251  } else {
252  if (!q->hasSubjobs()) // don't go there yet if we're still listing some subdirs
253  finishedStatPhase();
254  }
255 }
256 
257 void DeleteJobPrivate::finishedStatPhase()
258 {
259  m_totalFilesDirs = files.count() + symlinks.count() + dirs.count();
260  slotReport();
261  // Now we know which dirs hold the files we're going to delete.
262  // To speed things up and prevent double-notification, we disable KDirWatch
263  // on those dirs temporarily (using KDirWatch::self, that's the instance
264  // used by e.g. kdirlister).
265  const QSet<QString>::const_iterator itEnd = m_parentDirs.constEnd();
266  for ( QSet<QString>::const_iterator it = m_parentDirs.constBegin() ; it != itEnd ; ++it )
267  KDirWatch::self()->stopDirScan( *it );
268  state = DELETEJOB_STATE_DELETING_FILES;
269  deleteNextFile();
270 }
271 
272 void DeleteJobPrivate::deleteNextFile()
273 {
274  Q_Q(DeleteJob);
275  //kDebug(7007);
276  if ( !files.isEmpty() || !symlinks.isEmpty() )
277  {
278  SimpleJob *job;
279  do {
280  // Take first file to delete out of list
281  KUrl::List::iterator it = files.begin();
282  bool isLink = false;
283  if ( it == files.end() ) // No more files
284  {
285  it = symlinks.begin(); // Pick up a symlink to delete
286  isLink = true;
287  }
288  // Normal deletion
289  // If local file, try do it directly
290 #ifdef Q_WS_WIN
291  if ( (*it).isLocalFile() && DeleteFileW( (LPCWSTR)(*it).toLocalFile().utf16() ) != 0 ) {
292 #else
293  if ( (*it).isLocalFile() && unlink( QFile::encodeName((*it).toLocalFile()) ) == 0 ) {
294 #endif
295  //kdDebug(7007) << "DeleteJob deleted" << (*it).toLocalFile();
296  job = 0;
297  m_processedFiles++;
298  if ( m_processedFiles % 300 == 1 || m_totalFilesDirs < 300) { // update progress info every 300 files
299  m_currentURL = *it;
300  slotReport();
301  }
302  } else
303  { // if remote - or if unlink() failed (we'll use the job's error handling in that case)
304  //kDebug(7007) << "calling file_delete on" << *it;
305  if (isHttpProtocol(it->protocol()))
306  job = KIO::http_delete( *it, KIO::HideProgressInfo );
307  else
308  job = KIO::file_delete( *it, KIO::HideProgressInfo );
309  Scheduler::setJobPriority(job, 1);
310  m_currentURL=(*it);
311  }
312  if ( isLink )
313  symlinks.erase(it);
314  else
315  files.erase(it);
316  if ( job ) {
317  q->addSubjob(job);
318  return;
319  }
320  // loop only if direct deletion worked (job=0) and there is something else to delete
321  } while (!job && (!files.isEmpty() || !symlinks.isEmpty()));
322  }
323  state = DELETEJOB_STATE_DELETING_DIRS;
324  deleteNextDir();
325 }
326 
327 void DeleteJobPrivate::deleteNextDir()
328 {
329  Q_Q(DeleteJob);
330  if ( !dirs.isEmpty() ) // some dirs to delete ?
331  {
332  do {
333  // Take first dir to delete out of list - last ones first !
334  KUrl::List::iterator it = --dirs.end();
335  // If local dir, try to rmdir it directly
336 #ifdef Q_WS_WIN
337  if ( (*it).isLocalFile() && RemoveDirectoryW( (LPCWSTR)(*it).toLocalFile().utf16() ) != 0 ) {
338 #else
339  if ( (*it).isLocalFile() && ::rmdir( QFile::encodeName((*it).toLocalFile()) ) == 0 ) {
340 #endif
341  m_processedDirs++;
342  if ( m_processedDirs % 100 == 1 ) { // update progress info every 100 dirs
343  m_currentURL = *it;
344  slotReport();
345  }
346  } else {
347  // Call rmdir - works for kioslaves with canDeleteRecursive too,
348  // CMD_DEL will trigger the recursive deletion in the slave.
349  SimpleJob* job;
350  if (isHttpProtocol(it->protocol())) {
351  KUrl url (*it);
352  url.adjustPath(KUrl::AddTrailingSlash);
353  job = KIO::http_delete(url, KIO::HideProgressInfo);
354  } else {
355  job = KIO::rmdir(*it);
356  job->addMetaData(QString::fromLatin1("recurse"), "true");
357  }
358  Scheduler::setJobPriority(job, 1);
359  dirs.erase(it);
360  q->addSubjob( job );
361  return;
362  }
363  dirs.erase(it);
364  } while ( !dirs.isEmpty() );
365  }
366 
367  // Re-enable watching on the dirs that held the deleted files
368  const QSet<QString>::const_iterator itEnd = m_parentDirs.constEnd();
369  for (QSet<QString>::const_iterator it = m_parentDirs.constBegin() ; it != itEnd ; ++it) {
370  KDirWatch::self()->restartDirScan( *it );
371  }
372 
373  // Finished - tell the world
374  if ( !m_srcList.isEmpty() )
375  {
376  //kDebug(7007) << "KDirNotify'ing FilesRemoved " << m_srcList.toStringList();
377  org::kde::KDirNotify::emitFilesRemoved( m_srcList.toStringList() );
378  }
379  if (m_reportTimer!=0)
380  m_reportTimer->stop();
381  q->emitResult();
382 }
383 
384 void DeleteJobPrivate::currentSourceStated(bool isDir, bool isLink)
385 {
386  Q_Q(DeleteJob);
387  const KUrl url = (*m_currentStat);
388  if (isDir && !isLink) {
389  // Add toplevel dir in list of dirs
390  dirs.append( url );
391  if (url.isLocalFile()) {
392  // We are about to delete this dir, no need to watch it
393  // Maybe we should ask kdirwatch to remove all watches recursively?
394  // But then there would be no feedback (things disappearing progressively) during huge deletions
395  KDirWatch::self()->stopDirScan(url.toLocalFile(KUrl::RemoveTrailingSlash));
396  }
397  if (!KProtocolManager::canDeleteRecursive(url)) {
398  //kDebug(7007) << url << "is a directory, let's list it";
399  ListJob *newjob = KIO::listRecursive(url, KIO::HideProgressInfo);
400  newjob->addMetaData("details", "0");
401  newjob->setUnrestricted(true); // No KIOSK restrictions
402  Scheduler::setJobPriority(newjob, 1);
403  QObject::connect(newjob, SIGNAL(entries(KIO::Job*,KIO::UDSEntryList)),
404  q, SLOT(slotEntries(KIO::Job*,KIO::UDSEntryList)));
405  q->addSubjob(newjob);
406  // Note that this listing job will happen in parallel with other stat jobs.
407  }
408  } else {
409  if (isLink) {
410  //kDebug(7007) << "Target is a symlink";
411  symlinks.append(url);
412  } else {
413  //kDebug(7007) << "Target is a file";
414  files.append(url);
415  }
416  }
417  if (url.isLocalFile()) {
418  const QString parentDir = url.directory(KUrl::IgnoreTrailingSlash);
419  m_parentDirs.insert(parentDir);
420  }
421 }
422 
423 void DeleteJob::slotResult( KJob *job )
424 {
425  Q_D(DeleteJob);
426  switch ( d->state )
427  {
428  case DELETEJOB_STATE_STATING:
429  removeSubjob( job );
430 
431  // Was this a stat job or a list job? We do both in parallel.
432  if (StatJob* statJob = qobject_cast<StatJob*>(job)) {
433  // Was there an error while stating ?
434  if (job->error()) {
435  // Probably : doesn't exist
436  Job::slotResult(job); // will set the error and emit result(this)
437  return;
438  }
439 
440  const UDSEntry entry = statJob->statResult();
441  // Is it a file or a dir ?
442  const bool isLink = entry.isLink();
443  const bool isDir = entry.isDir();
444  d->currentSourceStated(isDir, isLink);
445 
446  ++d->m_currentStat;
447  d->statNextSrc();
448  } else {
449  if (job->error()) {
450  // Try deleting nonetheless, it may be empty (and non-listable)
451  }
452  if (!hasSubjobs())
453  d->finishedStatPhase();
454  }
455  break;
456  case DELETEJOB_STATE_DELETING_FILES:
457  // Propagate the subjob's metadata (a SimpleJob) to the real DeleteJob
458  // FIXME: setMetaData() in the KIO API only allows access to outgoing metadata,
459  // but we need to alter the incoming one
460  d->m_incomingMetaData = dynamic_cast<KIO::Job*>(job)->metaData();
461 
462  if ( job->error() )
463  {
464  Job::slotResult( job ); // will set the error and emit result(this)
465  return;
466  }
467  removeSubjob( job );
468  Q_ASSERT( !hasSubjobs() );
469  d->m_processedFiles++;
470 
471  d->deleteNextFile();
472  break;
473  case DELETEJOB_STATE_DELETING_DIRS:
474  if ( job->error() )
475  {
476  Job::slotResult( job ); // will set the error and emit result(this)
477  return;
478  }
479  removeSubjob( job );
480  Q_ASSERT( !hasSubjobs() );
481  d->m_processedDirs++;
482  //emit processedAmount( this, KJob::Directories, d->m_processedDirs );
483  //emitPercent( d->m_processedFiles + d->m_processedDirs, d->m_totalFilesDirs );
484 
485  d->deleteNextDir();
486  break;
487  default:
488  Q_ASSERT(0);
489  }
490 }
491 
492 DeleteJob *KIO::del( const KUrl& src, JobFlags flags )
493 {
494  KUrl::List srcList;
495  srcList.append( src );
496  DeleteJob* job = DeleteJobPrivate::newJob(srcList, flags);
497  ClipboardUpdater::create(job, ClipboardUpdater::RemoveContent);
498  return job;
499 }
500 
501 DeleteJob *KIO::del( const KUrl::List& src, JobFlags flags )
502 {
503  DeleteJob* job = DeleteJobPrivate::newJob(src, flags);
504  ClipboardUpdater::create(job, ClipboardUpdater::RemoveContent);
505  return job;
506 }
507 
508 #include "deletejob.moc"
KIO::UDSEntry::UDS_URL
An alternative URL (If different from the caption).
Definition: udsentry.h:190
kdirlister.h
KIO::DeleteJob::slotResult
virtual void slotResult(KJob *job)
Definition: deletejob.cpp:423
KUrl::adjustPath
void adjustPath(AdjustPathOption trailing)
KUrl::directory
QString directory(const DirectoryOptions &options=IgnoreTrailingSlash) const
KUrl::RemoveTrailingSlash
KDirWatch::self
static KDirWatch * self()
KIO::UDSEntry::isLink
bool isLink() const
Definition: udsentry.cpp:89
KProtocolManager::canDeleteRecursive
static bool canDeleteRecursive(const KUrl &url)
Returns whether the protocol can recursively delete directories by itself.
Definition: kprotocolmanager.cpp:1151
KIO::Job::addMetaData
void addMetaData(const QString &key, const QString &value)
Add key/value pair to the meta data that is sent to the slave.
Definition: job.cpp:264
KIO::DELETEJOB_STATE_DELETING_FILES
Definition: deletejob.cpp:54
KFileItem::isDir
bool isDir() const
Returns true if this item represents a directory.
Definition: kfileitem.cpp:1141
kdebug.h
KUrl::AddTrailingSlash
KCompositeJob::setUiDelegate
void setUiDelegate(KJobUiDelegate *delegate)
KIO::UDSEntry
Universal Directory Service.
Definition: udsentry.h:58
KIO::Scheduler::setJobPriority
static void setJobPriority(SimpleJob *job, int priority)
Changes the priority of job; jobs of the same priority run in the order in which they were created...
Definition: scheduler.cpp:805
kdirwatch.h
timeout
int timeout
KIO::ListJob
A ListJob is allows you to get the get the content of a directory.
Definition: jobclasses.h:936
kdirnotify.h
KFileItem::isNull
bool isNull() const
Return true if default-constructed.
Definition: kfileitem.cpp:1714
KIO::HideProgressInfo
Hide progress information dialog, i.e.
Definition: jobclasses.h:51
KIO::ERR_CANNOT_DELETE
Definition: global.h:235
QPointer
dirs
KStandardDirs * dirs()
KIO::UDSEntry::isDir
bool isDir() const
Definition: udsentry.cpp:84
KIO::stat
StatJob * stat(const KUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition: job.cpp:924
KIO::file_delete
SimpleJob * file_delete(const KUrl &src, JobFlags flags=DefaultFlags)
Delete a single file.
Definition: job.cpp:2487
KIO::StatJob
A KIO job that retrieves information about a file or directory.
Definition: jobclasses.h:440
KDirLister::cachedItemForUrl
static KFileItem cachedItemForUrl(const KUrl &url)
Return the KFileItem for the given URL, if we listed it recently and it's still in the cache - which ...
Definition: kdirlister.cpp:2788
KUrl::toLocalFile
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
isHttpProtocol
static bool isHttpProtocol(const QString &protocol)
Definition: deletejob.cpp:44
KIO::Job::removeSubjob
virtual bool removeSubjob(KJob *job)
Mark a sub job as being done.
Definition: job.cpp:118
klocale.h
KIO::DeleteJob::DeleteJob
DeleteJob(DeleteJobPrivate &dd)
Definition: deletejob.cpp:117
KUrl
KIO::ListJob::setUnrestricted
void setUnrestricted(bool unrestricted)
Do not apply any KIOSK restrictions to this job.
Definition: job.cpp:2745
kprotocolmanager.h
KDirWatch::stopDirScan
bool stopDirScan(const QString &path)
scheduler.h
KUrl::addPath
void addPath(const QString &txt)
QList::append
void append(const T &value)
OrgKdeKDirNotifyInterface::emitFilesRemoved
static void emitFilesRemoved(const QStringList &fileList)
Definition: kdirnotify.cpp:57
QString::insert
QString & insert(int position, QChar ch)
QTimer
KProtocolManager::supportsDeleting
static bool supportsDeleting(const KUrl &url)
Returns whether the protocol can delete files/objects.
Definition: kprotocolmanager.cpp:1077
KIO::JobUiDelegate
A UI delegate tuned to be used with KIO Jobs.
Definition: jobuidelegate.h:39
KIO::DeleteJob
A more complex Job to delete files and directories.
Definition: deletejob.h:43
KCompositeJob::slotResult
virtual void slotResult(KJob *job)
KIO::buildErrorString
QString buildErrorString(int errorCode, const QString &errorText)
Returns a translated error message for errorCode using the additional error information provided by e...
Definition: global.cpp:164
QString::isEmpty
bool isEmpty() const
QString::startsWith
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
KIO::UDSEntry::stringValue
QString stringValue(uint field) const
Definition: udsentry.cpp:73
KIO::getJobTracker
KJobTrackerInterface * getJobTracker()
Definition: global.cpp:1246
QSet::constEnd
const_iterator constEnd() const
KIO::Job::metaData
MetaData metaData() const
Get meta data received from the slave.
Definition: job.cpp:248
KIO::rmdir
SimpleJob * rmdir(const KUrl &url)
Removes a single directory.
Definition: job.cpp:704
QSet< QString >
QString
KIO::ClipboardUpdater::RemoveContent
Definition: clipboardupdater_p.h:57
QList< UDSEntry >
jobuidelegate.h
QFileInfo
QList::end
iterator end()
KFileItem::isLink
bool isLink() const
Returns true if this item represents a link in the UNIX sense of a link.
Definition: kfileitem.cpp:1567
KIO::JobPrivate::emitDeleting
static void emitDeleting(KIO::Job *, const KUrl &url)
Definition: job.cpp:144
kio_resolve_local_urls
bool kio_resolve_local_urls
Definition: copyjob.cpp:297
QSet::constBegin
const_iterator constBegin() const
KIO::ClipboardUpdater::create
static ClipboardUpdater * create(Job *job, Mode mode)
Returns an instance of clipboard updater if QApplication::type() does not return a tty...
Definition: clipboardupdater.cpp:162
KIO::del
DeleteJob * del(const KUrl &src, JobFlags flags=DefaultFlags)
Delete a file or directory.
Definition: deletejob.cpp:492
job_p.h
KUrl::List
QLatin1String
KIO::http_delete
TransferJob * http_delete(const KUrl &url, JobFlags flags=DefaultFlags)
HTTP DELETE.
Definition: job.cpp:1637
KIO::listRecursive
ListJob * listRecursive(const KUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
The same as the previous method, but recurses subdirectories.
Definition: job.cpp:2740
KIO::UDSEntry::UDS_NAME
Filename - as displayed in directory listings etc.
Definition: udsentry.h:163
QList< UDSEntry >::ConstIterator
typedef ConstIterator
KUrl::IgnoreTrailingSlash
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KIO::DeleteJob::~DeleteJob
virtual ~DeleteJob()
Definition: deletejob.cpp:128
KCompositeJob::hasSubjobs
bool hasSubjobs()
QString::fromLatin1
QString fromLatin1(const char *str, int size)
deletejob.h
KIO::StatJob::SourceSide
Definition: jobclasses.h:446
KJobTrackerInterface::registerJob
virtual void registerJob(KJob *job)
KIO::DeleteJobState
DeleteJobState
Definition: deletejob.cpp:52
KIO::DELETEJOB_STATE_STATING
Definition: deletejob.cpp:53
clipboardupdater_p.h
KUrl::isLocalFile
bool isLocalFile() const
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KIO::DELETEJOB_STATE_DELETING_DIRS
Definition: deletejob.cpp:55
KIO::JobPrivate
Definition: job_p.h:39
end
const KShortcut & end()
KJob
KDirWatch::restartDirScan
bool restartDirScan(const QString &path)
QList::begin
iterator begin()
KIO::DeleteJob::urls
KUrl::List urls() const
Returns the list of URLs.
Definition: deletejob.cpp:132
QFile::encodeName
QByteArray encodeName(const QString &fileName)
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:45
KRecentDirs::list
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
QTimer::singleShot
singleShot
KIO::SimpleJob
A simple job (one url and one command).
Definition: jobclasses.h:322
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal