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

kio/kfile

  • kio
  • kfile
kdirsize.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 David Faure <faure@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __KDIRSIZE_H
21 #define __KDIRSIZE_H
22 
23 #include <kio/job.h>
24 #include <kfileitem.h>
25 
30 class KIO_EXPORT KDirSize : public KIO::Job
31 {
32  Q_OBJECT
33 protected:
34  KDirSize( const KURL & directory );
35  KDirSize( const KFileItemList & lstItems );
36  ~KDirSize() {}
37 
38 public:
42  KIO::filesize_t totalSize() const { return m_totalSize; }
43 
49  KIO::filesize_t totalFiles() const { return m_totalFiles; }
50 
57  KIO::filesize_t totalSubdirs() const { return m_totalSubdirs; }
58 
63  static KDirSize * dirSizeJob( const KURL & directory );
64 
72  static KDirSize * dirSizeJob( const KFileItemList & lstItems );
73 
78  static KIO::filesize_t dirSize( const KURL & directory );
79 
80 protected:
84  void setSync() { m_bAsync = false; }
85 
86  void startNextJob( const KURL & url );
87 
88 protected slots:
89 
90  virtual void slotResult( KIO::Job *job );
91  void slotEntries( KIO::Job * , const KIO::UDSEntryList &);
92  void processList();
93 
94 private:
95  bool m_bAsync;
96  KIO::filesize_t m_totalSize;
97  KIO::filesize_t m_totalFiles;
98  KIO::filesize_t m_totalSubdirs;
99  KFileItemList m_lstItems;
100 protected:
101  virtual void virtual_hook( int id, void* data );
102 private:
103  class KDirSize* d;
104 };
105 
106 #endif
KDirSize::totalFiles
KIO::filesize_t totalFiles() const
Definition: kdirsize.h:49
KDirSize::totalSize
KIO::filesize_t totalSize() const
Definition: kdirsize.h:42
KDirSize::totalSubdirs
KIO::filesize_t totalSubdirs() const
Definition: kdirsize.h:57
KDirSize
Computes a directory size (similar to "du", but doesn&#39;t give the same results since we simply sum up ...
Definition: kdirsize.h:30

kio/kfile

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

kio/kfile

Skip menu "kio/kfile"
  • 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/kfile 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. |