1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
'\" t
.TH TQUrlInfo 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQUrlInfo \- Stores information about URLs
.SH SYNOPSIS
\fC#include <tqurlinfo.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBPermissionSpec\fR { ReadOwner = 00400, WriteOwner = 00200, ExeOwner = 00100, ReadGroup = 00040, WriteGroup = 00020, ExeGroup = 00010, ReadOther = 00004, WriteOther = 00002, ExeOther = 00001 }"
.br
.ti -1c
.BI "\fBTQUrlInfo\fR ()"
.br
.ti -1c
.BI "\fBTQUrlInfo\fR ( const TQUrlOperator & path, const TQString & file )"
.br
.ti -1c
.BI "\fBTQUrlInfo\fR ( const TQUrlInfo & ui )"
.br
.ti -1c
.BI "\fBTQUrlInfo\fR ( const TQString & name, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )"
.br
.ti -1c
.BI "\fBTQUrlInfo\fR ( const TQUrl & url, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )"
.br
.ti -1c
.BI "TQUrlInfo & \fBoperator=\fR ( const TQUrlInfo & ui )"
.br
.ti -1c
.BI "virtual \fB~TQUrlInfo\fR ()"
.br
.ti -1c
.BI "virtual void \fBsetName\fR ( const TQString & name )"
.br
.ti -1c
.BI "virtual void \fBsetDir\fR ( bool b )"
.br
.ti -1c
.BI "virtual void \fBsetFile\fR ( bool b )"
.br
.ti -1c
.BI "virtual void \fBsetSymLink\fR ( bool b )"
.br
.ti -1c
.BI "virtual void \fBsetOwner\fR ( const TQString & s )"
.br
.ti -1c
.BI "virtual void \fBsetGroup\fR ( const TQString & s )"
.br
.ti -1c
.BI "virtual void \fBsetSize\fR ( uint size )"
.br
.ti -1c
.BI "virtual void \fBsetWritable\fR ( bool b )"
.br
.ti -1c
.BI "virtual void \fBsetReadable\fR ( bool b )"
.br
.ti -1c
.BI "virtual void \fBsetPermissions\fR ( int p )"
.br
.ti -1c
.BI "virtual void \fBsetLastModified\fR ( const TQDateTime & dt )"
.br
.ti -1c
.BI "bool \fBisValid\fR () const"
.br
.ti -1c
.BI "TQString \fBname\fR () const"
.br
.ti -1c
.BI "int \fBpermissions\fR () const"
.br
.ti -1c
.BI "TQString \fBowner\fR () const"
.br
.ti -1c
.BI "TQString \fBgroup\fR () const"
.br
.ti -1c
.BI "uint \fBsize\fR () const"
.br
.ti -1c
.BI "TQDateTime \fBlastModified\fR () const"
.br
.ti -1c
.BI "TQDateTime \fBlastRead\fR () const"
.br
.ti -1c
.BI "bool \fBisDir\fR () const"
.br
.ti -1c
.BI "bool \fBisFile\fR () const"
.br
.ti -1c
.BI "bool \fBisSymLink\fR () const"
.br
.ti -1c
.BI "bool \fBisWritable\fR () const"
.br
.ti -1c
.BI "bool \fBisReadable\fR () const"
.br
.ti -1c
.BI "bool \fBisExecutable\fR () const"
.br
.ti -1c
.BI "bool \fBoperator==\fR ( const TQUrlInfo & i ) const"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "bool \fBgreaterThan\fR ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )"
.br
.ti -1c
.BI "bool \fBlessThan\fR ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )"
.br
.ti -1c
.BI "bool \fBequal\fR ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )"
.br
.in -1c
.SH DESCRIPTION
The TQUrlInfo class stores information about URLs.
.PP
This class is just a container for storing information about URLs, which is why all information must be passed in the constructor.
.PP
Unless you're reimplementing a network protocol you're unlikely to create TQUrlInfo objects yourself, but you may receive TQUrlInfo objects from functions, e.g. TQUrlOperator::info().
.PP
The information that can be retrieved includes name(), permissions(), owner(), group(), size(), lastModified(), lastRead(), isDir(), isFile(), isSymLink(), isWritable(), isReadable() and isExecutable().
.PP
See also Input/Output and Networking and Miscellaneous Classes.
.SS "Member Type Documentation"
.SH "TQUrlInfo::PermissionSpec"
This enum is used by the permissions() function to report the permissions of a file.
.TP
\fCTQUrlInfo::ReadOwner\fR - The file is readable by the owner of the file.
.TP
\fCTQUrlInfo::WriteOwner\fR - The file is writable by the owner of the file.
.TP
\fCTQUrlInfo::ExeOwner\fR - The file is executable by the owner of the file.
.TP
\fCTQUrlInfo::ReadGroup\fR - The file is readable by the group.
.TP
\fCTQUrlInfo::WriteGroup\fR - The file is writable by the group.
.TP
\fCTQUrlInfo::ExeGroup\fR - The file is executable by the group.
.TP
\fCTQUrlInfo::ReadOther\fR - The file is readable by anyone.
.TP
\fCTQUrlInfo::WriteOther\fR - The file is writable by anyone.
.TP
\fCTQUrlInfo::ExeOther\fR - The file is executable by anyone.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQUrlInfo::TQUrlInfo ()"
Constructs an invalid TQUrlInfo object with default values.
.PP
See also isValid().
.SH "TQUrlInfo::TQUrlInfo ( const TQUrlOperator & path, const TQString & file )"
Constructs a TQUrlInfo object with information about the file \fIfile\fR in the \fIpath\fR. It tries to find the information about the \fIfile\fR in the TQUrlOperator \fIpath\fR.
.PP
If the information is not found, this constructor creates an invalid TQUrlInfo, i.e. isValid() returns FALSE. You should always check if the URL info is valid before relying on the return values of any getter functions.
.PP
If \fIfile\fR is empty, it defaults to the TQUrlOperator \fIpath\fR, i.e. to the directory.
.PP
See also isValid() and TQUrlOperator::info().
.SH "TQUrlInfo::TQUrlInfo ( const TQUrlInfo & ui )"
Copy constructor, copies \fIui\fR to this URL info object.
.SH "TQUrlInfo::TQUrlInfo ( const TQString & name, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )"
Constructs a TQUrlInfo object by specifying all the URL's information.
.PP
The information that is passed is the \fIname\fR, file \fIpermissions\fR, \fIowner\fR and \fIgroup\fR and the file's \fIsize\fR. Also passed is the \fIlastModified\fR date/time and the \fIlastRead\fR date/time. Flags are also passed, specifically, \fIisDir\fR, \fIisFile\fR, \fIisSymLink\fR, \fIisWritable\fR, \fIisReadable\fR and \fIisExecutable\fR.
.SH "TQUrlInfo::TQUrlInfo ( const TQUrl & url, int permissions, const TQString & owner, const TQString & group, uint size, const TQDateTime & lastModified, const TQDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )"
Constructs a TQUrlInfo object by specifying all the URL's information.
.PP
The information that is passed is the \fIurl\fR, file \fIpermissions\fR, \fIowner\fR and \fIgroup\fR and the file's \fIsize\fR. Also passed is the \fIlastModified\fR date/time and the \fIlastRead\fR date/time. Flags are also passed, specifically, \fIisDir\fR, \fIisFile\fR, \fIisSymLink\fR, \fIisWritable\fR, \fIisReadable\fR and \fIisExecutable\fR.
.SH "TQUrlInfo::~TQUrlInfo ()\fC [virtual]\fR"
Destroys the URL info object.
.PP
The TQUrlOperator object to which this URL referred (if any) is not affected.
.SH "bool TQUrlInfo::equal ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )\fC [static]\fR"
Returns TRUE if \fIi1\fR equals to \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
.SH "bool TQUrlInfo::greaterThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )\fC [static]\fR"
Returns TRUE if \fIi1\fR is greater than \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
.SH "TQString TQUrlInfo::group () const"
Returns the group of the URL.
.PP
See also isValid().
.SH "bool TQUrlInfo::isDir () const"
Returns TRUE if the URL is a directory; otherwise returns FALSE.
.PP
See also isValid().
.PP
Examples:
.)l network/ftpclient/ftpmainwindow.ui.h and network/networkprotocol/nntp.cpp.
.SH "bool TQUrlInfo::isExecutable () const"
Returns TRUE if the URL is executable; otherwise returns FALSE.
.PP
See also isValid().
.SH "bool TQUrlInfo::isFile () const"
Returns TRUE if the URL is a file; otherwise returns FALSE.
.PP
See also isValid().
.SH "bool TQUrlInfo::isReadable () const"
Returns TRUE if the URL is readable; otherwise returns FALSE.
.PP
See also isValid().
.SH "bool TQUrlInfo::isSymLink () const"
Returns TRUE if the URL is a symbolic link; otherwise returns FALSE.
.PP
See also isValid().
.SH "bool TQUrlInfo::isValid () const"
Returns TRUE if the URL info is valid; otherwise returns FALSE. Valid means that the TQUrlInfo contains real information. For example, a call to TQUrlOperator::info() might return a an invalid TQUrlInfo, if no information about the requested entry is available.
.PP
You should always check if the URL info is valid before relying on the values.
.SH "bool TQUrlInfo::isWritable () const"
Returns TRUE if the URL is writable; otherwise returns FALSE.
.PP
See also isValid().
.SH "TQDateTime TQUrlInfo::lastModified () const"
Returns the last modification date of the URL.
.PP
See also isValid().
.PP
Example: network/ftpclient/ftpmainwindow.ui.h.
.SH "TQDateTime TQUrlInfo::lastRead () const"
Returns the date when the URL was last read.
.PP
See also isValid().
.SH "bool TQUrlInfo::lessThan ( const TQUrlInfo & i1, const TQUrlInfo & i2, int sortBy )\fC [static]\fR"
Returns TRUE if \fIi1\fR is less than \fIi2\fR; otherwise returns FALSE. The objects are compared by the value, which is specified by \fIsortBy\fR. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
.SH "TQString TQUrlInfo::name () const"
Returns the file name of the URL.
.PP
See also isValid().
.PP
Example: network/ftpclient/ftpmainwindow.ui.h.
.SH "TQUrlInfo & TQUrlInfo::operator= ( const TQUrlInfo & ui )"
Assigns the values of \fIui\fR to this TQUrlInfo object.
.SH "bool TQUrlInfo::operator== ( const TQUrlInfo & i ) const"
Compares this TQUrlInfo with \fIi\fR and returns TRUE if they are equal; otherwise returns FALSE.
.SH "TQString TQUrlInfo::owner () const"
Returns the owner of the URL.
.PP
See also isValid().
.SH "int TQUrlInfo::permissions () const"
Returns the permissions of the URL. You can use the PermissionSpec flags to test for certain permissions.
.PP
See also isValid().
.SH "void TQUrlInfo::setDir ( bool b )\fC [virtual]\fR"
If \fIb\fR is TRUE then the URL is set to be a directory; if \\b is FALSE then the URL is set not to be a directory (which normally means it is a file). (Note that a URL can refer to both a file and a directory even though most file systems do not support this.)
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "void TQUrlInfo::setFile ( bool b )\fC [virtual]\fR"
If \fIb\fR is TRUE then the URL is set to be a file; if \\b is FALSE then the URL is set not to be a file (which normally means it is a directory). (Note that a URL can refer to both a file and a directory even though most file systems do not support this.)
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "void TQUrlInfo::setGroup ( const TQString & s )\fC [virtual]\fR"
Specifies that the owning group of the URL is called \fIs\fR.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.SH "void TQUrlInfo::setLastModified ( const TQDateTime & dt )\fC [virtual]\fR"
Specifies that the object the URL refers to was last modified at \fIdt\fR.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.SH "void TQUrlInfo::setName ( const TQString & name )\fC [virtual]\fR"
Sets the name of the URL to \fIname\fR. The name is the full text, for example, "http://doc.trolltech.com/tqurlinfo.html".
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "void TQUrlInfo::setOwner ( const TQString & s )\fC [virtual]\fR"
Specifies that the owner of the URL is called \fIs\fR.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.SH "void TQUrlInfo::setPermissions ( int p )\fC [virtual]\fR"
Specifies that the URL has access permisions, \fIp\fR.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.SH "void TQUrlInfo::setReadable ( bool b )\fC [virtual]\fR"
Specifies that the URL is readable if \fIb\fR is TRUE and not readable if \fIb\fR is FALSE.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "void TQUrlInfo::setSize ( uint size )\fC [virtual]\fR"
Specifies the \fIsize\fR of the URL.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.SH "void TQUrlInfo::setSymLink ( bool b )\fC [virtual]\fR"
Specifies that the URL refers to a symbolic link if \fIb\fR is TRUE and that it does not if \fIb\fR is FALSE.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "void TQUrlInfo::setWritable ( bool b )\fC [virtual]\fR"
Specifies that the URL is writable if \fIb\fR is TRUE and not writable if \fIb\fR is FALSE.
.PP
If you call this function for an invalid URL info, this function turns it into a valid one.
.PP
See also isValid().
.PP
Example: network/networkprotocol/nntp.cpp.
.SH "uint TQUrlInfo::size () const"
Returns the size of the URL.
.PP
See also isValid().
.PP
Example: network/ftpclient/ftpmainwindow.ui.h.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqurlinfo.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqurlinfo.3qt) and the Qt
version (3.3.8).
|