• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
ktempdir.h
1 /*
2  This file is part of the KDE libraries
3  Copyright (c) 2003 Joseph Wenninger <jowenn@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
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 _KTEMPDIR_H_
21 #define _KTEMPDIR_H_
22 
23 #include <tqstring.h>
24 #include <stdio.h>
25 #include <errno.h>
26 #include "tdelibs_export.h"
27 
28 class TQDir;
29 class KTempDirPrivate;
30 
53 class TDECORE_EXPORT KTempDir
54 {
55 public:
71  KTempDir(TQString directoryPrefix=TQString::null,
72  int mode = 0700 );
73 
74 
78  ~KTempDir();
79 
85  void setAutoDelete(bool autoDelete) { bAutoDelete = autoDelete; }
86 
96  int status() const;
97 
103  TQString name() const;
104 
105 
111  TQDir *qDir();
112 
116  void unlink();
117 
121  bool existing() const;
122 
144  static bool removeDir( const TQString& path );
145 
146 protected:
147 
155  bool create(const TQString &directoryPrefix, int mode);
156 
161  void setError(int error) { mError = error; }
162 
163 private:
164  int mError;
165  TQString mTmpName;
166  bool bExisting;
167  bool bAutoDelete;
168 
169  KTempDirPrivate *d;
170 };
171 
172 #endif
KTempDir
The KTempDir class creates a unique directory for temporary use.
Definition: ktempdir.h:53
KTempDir::setError
void setError(int error)
Sets the errno value.
Definition: ktempdir.h:161
KTempDir::setAutoDelete
void setAutoDelete(bool autoDelete)
Turn automatic deletion on or off.
Definition: ktempdir.h:85

tdecore

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

tdecore

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