• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

  • tdeio
  • tdefile
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 <tdeio/job.h>
24#include <tdefileitem.h>
25
30class TDEIO_EXPORT KDirSize : public TDEIO::Job
31{
32 TQ_OBJECT
33protected:
34 KDirSize( const KURL & directory );
35 KDirSize( const KFileItemList & lstItems );
36 ~KDirSize() {}
37
38public:
42 TDEIO::filesize_t totalSize() const { return m_totalSize; }
43
49 TDEIO::filesize_t totalFiles() const { return m_totalFiles; }
50
57 TDEIO::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 TDEIO::filesize_t dirSize( const KURL & directory );
79
80protected:
84 void setSync() { m_bAsync = false; }
85
86 void startNextJob( const KURL & url );
87
88protected slots:
89
90 virtual void slotResult( TDEIO::Job *job );
91 void slotEntries( TDEIO::Job * , const TDEIO::UDSEntryList &);
92 void processList();
93
94private:
95 bool m_bAsync;
96 TDEIO::filesize_t m_totalSize;
97 TDEIO::filesize_t m_totalFiles;
98 TDEIO::filesize_t m_totalSubdirs;
99 KFileItemList m_lstItems;
100protected:
101 virtual void virtual_hook( int id, void* data );
102private:
103 class KDirSize* d;
104};
105
106#endif
KDirSize
Computes a directory size (similar to "du", but doesn't give the same results since we simply sum up ...
Definition: kdirsize.h:31
KDirSize::totalFiles
TDEIO::filesize_t totalFiles() const
Definition: kdirsize.h:49
KDirSize::totalSize
TDEIO::filesize_t totalSize() const
Definition: kdirsize.h:42
KDirSize::totalSubdirs
TDEIO::filesize_t totalSubdirs() const
Definition: kdirsize.h:57

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.