Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/qtools/qfileinfo.h

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/****************************************************************************
2**
3**
4** Definition of QFileInfo class
5**
6** Created : 950628
7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QFILEINFO_H
39#define QFILEINFO_H
40
41#ifndef QT_H
42#include "qfile.h"
43#include "qdatetime.h"
44#endif // QT_H
45
46
47class QDir;
48struct QFileInfoCache;
49
50
51class Q_EXPORT QFileInfo // file information class
52{
53public:
54 enum PermissionSpec {
55ReadUser = 0400, WriteUser = 0200, ExeUser = 0100,
56ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010,
57ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 };
58
59 QFileInfo();
60 QFileInfo( const QString &file );
61 QFileInfo( const QFile & );
62#ifndef QT_NO_DIR
63 QFileInfo( const QDir &, const QString &fileName );
64#endif
65 QFileInfo( const QFileInfo & );
66 ~QFileInfo();
67
68 QFileInfo &operator=( const QFileInfo & );
69
70 voidsetFile( const QString &file );
71 voidsetFile( const QFile & );
72#ifndef QT_NO_DIR
73 voidsetFile( const QDir &, const QString &fileName );
74#endif
75 boolexists()const;
76 voidrefresh()const;
77 boolcaching()const;
78 voidsetCaching( bool );
79
80 QStringfilePath()const;
81 QStringfileName()const;
82#ifndef QT_NO_DIR //###
83 QStringabsFilePath()const;
84#endif
85 QStringbaseName()const;
86 QStringextension( bool complete = TRUE ) const;
87
88#ifndef QT_NO_DIR //###
89 QStringdirPath( bool absPath = FALSE ) const;
90#endif
91#ifndef QT_NO_DIR
92 QDirdir( bool absPath = FALSE )const;
93#endif
94 boolisReadable()const;
95 boolisWritable()const;
96 boolisExecutable()const;
97
98#ifndef QT_NO_DIR //###
99 boolisRelative()const;
100 boolconvertToAbs();
101#endif
102
103 boolisFile()const;
104 boolisDir()const;
105 boolisSymLink()const;
106
107 QStringreadLink()const;
108
109 QStringowner()const;
110 uintownerId()const;
111 QStringgroup()const;
112 uintgroupId()const;
113
114 boolpermission( int permissionSpec ) const;
115
116 uintsize()const;
117
118 QDateTimelastModified()const;
119 QDateTimelastRead()const;
120
121private:
122 voiddoStat() const;
123 static void slashify( QString & );
124 static void makeAbs( QString & );
125
126 QStringfn;
127 QFileInfoCache *fic;
128 boolcache;
129};
130
131
132inline bool QFileInfo::caching() const
133{
134 return cache;
135}
136
137
138#endif // QFILEINFO_H
139

Archive Download this file

Revision: 1322