File: qabstractfileengine.html

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (591 lines) | stat: -rw-r--r-- 37,356 bytes parent folder | download
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractFileEngine Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractFileEngine Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QAbstractFileEngine class provides an abstraction for
accessing the filesystem. <a href="#details">More...</a></p>

<p>Inherited by <a href="qfsfileengine.html">QFSFileEngine</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qabstractfileengine.html#FileFlag-enum">FileFlag</a></b> { ReadOwnerPerm, WriteOwnerPerm, ExeOwnerPerm, ReadUserPerm, ..., Refresh }</li><li><div class="fn" />class <b><a href="qabstractfileengine-fileflags.html">FileFlags</a></b></li><li><div class="fn" />enum <b><a href="qabstractfileengine.html#FileName-enum">FileName</a></b> { DefaultName, BaseName, PathName, AbsoluteName, ..., BundleName }</li><li><div class="fn" />enum <b><a href="qabstractfileengine.html#FileOwner-enum">FileOwner</a></b> { OwnerUser, OwnerGroup }</li><li><div class="fn" />enum <b><a href="qabstractfileengine.html#FileTime-enum">FileTime</a></b> { CreationTime, ModificationTime, AccessTime }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractfileengine.html#QAbstractFileEngine">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#atEnd">atEnd</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractFileEngineIterator <b><a href="qabstractfileengine.html#beginEntryList">beginEntryList</a></b> (<i>self</i>, QDir.Filters&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#caseSensitive">caseSensitive</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#close">close</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#copy">copy</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />QStringList <b><a href="qabstractfileengine.html#entryList">entryList</a></b> (<i>self</i>, QDir.Filters&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</li><li><div class="fn" />QFile.FileError <b><a href="qabstractfileengine.html#error">error</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengine.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />FileFlags <b><a href="qabstractfileengine.html#fileFlags">fileFlags</a></b> (<i>self</i>, FileFlags&#160;<i>type</i>&#160;=&#160;QAbstractFileEngine.FileInfoAll)</li><li><div class="fn" />QString <b><a href="qabstractfileengine.html#fileName">fileName</a></b> (<i>self</i>, FileName&#160;<i>file</i>&#160;=&#160;QAbstractFileEngine.DefaultName)</li><li><div class="fn" />QDateTime <b><a href="qabstractfileengine.html#fileTime">fileTime</a></b> (<i>self</i>, FileTime&#160;<i>time</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#flush">flush</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractfileengine.html#handle">handle</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#isRelativePath">isRelativePath</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#isSequential">isSequential</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#link">link</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />sip.voidptr <b><a href="qabstractfileengine.html#map">map</a></b> (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>size</i>, QFile.MemoryMapFlags&#160;<i>flags</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#mkdir">mkdir</a></b> (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>createParentDirectories</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#open">open</a></b> (<i>self</i>, QIODevice.OpenMode&#160;<i>openMode</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengine.html#owner">owner</a></b> (<i>self</i>, FileOwner)</li><li><div class="fn" />int <b><a href="qabstractfileengine.html#ownerId">ownerId</a></b> (<i>self</i>, FileOwner)</li><li><div class="fn" />int <b><a href="qabstractfileengine.html#pos">pos</a></b> (<i>self</i>)</li><li><div class="fn" />object <b><a href="qabstractfileengine.html#read">read</a></b> (<i>self</i>, int&#160;<i>maxlen</i>)</li><li><div class="fn" />object <b><a href="qabstractfileengine.html#readLine">readLine</a></b> (<i>self</i>, int&#160;<i>maxlen</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#remove">remove</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#rename">rename</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#rmdir">rmdir</a></b> (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>recurseParentDirectories</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#seek">seek</a></b> (<i>self</i>, int&#160;<i>pos</i>)</li><li><div class="fn" /><b><a href="qabstractfileengine.html#setError">setError</a></b> (<i>self</i>, QFile.FileError&#160;<i>error</i>, QString&#160;<i>str</i>)</li><li><div class="fn" /><b><a href="qabstractfileengine.html#setFileName">setFileName</a></b> (<i>self</i>, QString&#160;<i>file</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#setPermissions">setPermissions</a></b> (<i>self</i>, int&#160;<i>perms</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#setSize">setSize</a></b> (<i>self</i>, int&#160;<i>size</i>)</li><li><div class="fn" />int <b><a href="qabstractfileengine.html#size">size</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengine.html#unmap">unmap</a></b> (<i>self</i>, sip.voidptr&#160;<i>ptr</i>)</li><li><div class="fn" />int <b><a href="qabstractfileengine.html#write">write</a></b> (<i>self</i>, bytes&#160;<i>data</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QAbstractFileEngine <b><a href="qabstractfileengine.html#create">create</a></b> (QString&#160;<i>fileName</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractFileEngine class provides an abstraction for
accessing the filesystem.</p>
<p>The <a href="qdir.html">QDir</a>, <a href="qfile.html">QFile</a>, and <a href="qfileinfo.html">QFileInfo</a>
classes all make use of a QAbstractFileEngine internally. If you
create your own QAbstractFileEngine subclass (and register it with
Qt by creating a <a href="qabstractfileenginehandler.html">QAbstractFileEngineHandler</a>
subclass), your file engine will be used when the path is one that
your file engine handles.</p>
<p>A QAbstractFileEngine refers to one file or one directory. If
the referent is a file, the <a href="qabstractfileengine.html#setFileName">setFileName</a>(), <a href="qabstractfileengine.html#rename">rename</a>(), and <a href="qabstractfileengine.html#remove">remove</a>() functions are
applicable. If the referent is a directory the <a href="qabstractfileengine.html#mkdir">mkdir</a>(), <a href="qabstractfileengine.html#rmdir">rmdir</a>(), and <a href="qabstractfileengine.html#entryList">entryList</a>() functions are
applicable. In all cases the <a href="qabstractfileengine.html#caseSensitive">caseSensitive</a>(),
<a href="qabstractfileengine.html#isRelativePath">isRelativePath</a>(),
<a href="qabstractfileengine.html#fileFlags">fileFlags</a>(),
<a href="qabstractfileengine.html#ownerId">ownerId</a>(), <a href="qabstractfileengine.html#owner">owner</a>(), and <a href="qabstractfileengine.html#fileTime">fileTime</a>() functions are
applicable.</p>
<p>A QAbstractFileEngine subclass can be created to do synchronous
network I/O based file system operations, local file system
operations, or to operate as a resource system to access file based
resources.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="FileFlag-enum" />QAbstractFileEngine.FileFlag</h3><p>The permissions and types of a file, suitable for OR'ing
together.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ReadOwnerPerm</tt></td>
<td class="topAlign"><tt>0x4000</tt></td>
<td class="topAlign">The owner of the file has permission to read
it.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.WriteOwnerPerm</tt></td>
<td class="topAlign"><tt>0x2000</tt></td>
<td class="topAlign">The owner of the file has permission to write
to it.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ExeOwnerPerm</tt></td>
<td class="topAlign"><tt>0x1000</tt></td>
<td class="topAlign">The owner of the file has permission to
execute it.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ReadUserPerm</tt></td>
<td class="topAlign"><tt>0x0400</tt></td>
<td class="topAlign">The current user has permission to read the
file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.WriteUserPerm</tt></td>
<td class="topAlign"><tt>0x0200</tt></td>
<td class="topAlign">The current user has permission to write to
the file.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.ExeUserPerm</tt></td>
<td class="topAlign"><tt>0x0100</tt></td>
<td class="topAlign">The current user has permission to execute the
file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ReadGroupPerm</tt></td>
<td class="topAlign"><tt>0x0040</tt></td>
<td class="topAlign">Members of the current user's group have
permission to read the file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.WriteGroupPerm</tt></td>
<td class="topAlign"><tt>0x0020</tt></td>
<td class="topAlign">Members of the current user's group have
permission to write to the file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ExeGroupPerm</tt></td>
<td class="topAlign"><tt>0x0010</tt></td>
<td class="topAlign">Members of the current user's group have
permission to execute the file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ReadOtherPerm</tt></td>
<td class="topAlign"><tt>0x0004</tt></td>
<td class="topAlign">All users have permission to read the
file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.WriteOtherPerm</tt></td>
<td class="topAlign"><tt>0x0002</tt></td>
<td class="topAlign">All users have permission to write to the
file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ExeOtherPerm</tt></td>
<td class="topAlign"><tt>0x0001</tt></td>
<td class="topAlign">All users have permission to execute the
file.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.LinkType</tt></td>
<td class="topAlign"><tt>0x10000</tt></td>
<td class="topAlign">The file is a link to another file (or link)
in the file system (i.e. not a file or directory).</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.FileType</tt></td>
<td class="topAlign"><tt>0x20000</tt></td>
<td class="topAlign">The file is a regular file to the file system
(i.e. not a link or directory)</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.BundleType</tt></td>
<td class="topAlign"><tt>0x80000</tt></td>
<td class="topAlign">The file is a Mac OS X bundle implies
DirectoryType</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.DirectoryType</tt></td>
<td class="topAlign"><tt>0x40000</tt></td>
<td class="topAlign">The file is a directory in the file system
(i.e. not a link or file).</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.HiddenFlag</tt></td>
<td class="topAlign"><tt>0x0100000</tt></td>
<td class="topAlign">The file is hidden.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.ExistsFlag</tt></td>
<td class="topAlign"><tt>0x0400000</tt></td>
<td class="topAlign">The file actually exists in the file
system.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.RootFlag</tt></td>
<td class="topAlign"><tt>0x0800000</tt></td>
<td class="topAlign">The file or the file pointed to is the root of
the filesystem.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.LocalDiskFlag</tt></td>
<td class="topAlign"><tt>0x0200000</tt></td>
<td class="topAlign">The file resides on the local disk and can be
passed to standard file functions.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.Refresh</tt></td>
<td class="topAlign"><tt>0x1000000</tt></td>
<td class="topAlign">Passing this flag will force the file engine
to refresh all flags.</td>
</tr>
</table>
<p>The FileFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;FileFlag&gt;. It stores an OR
combination of FileFlag values.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#fileFlags">fileFlags</a>() and <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="FileName-enum" />QAbstractFileEngine.FileName</h3><p>These values are used to request a file name in a particular
format.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.DefaultName</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The same filename that was passed to the
<a href="qabstractfileengine.html">QAbstractFileEngine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.BaseName</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The name of the file excluding the path.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.PathName</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The path to the file excluding the base
name.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.AbsoluteName</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The absolute path to the file (including the
base name).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.AbsolutePathName</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The absolute path to the file (excluding the
base name).</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.LinkName</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The full file name of the file that this file
is a link to. (This will be empty if this file is not a link.)</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.CanonicalName</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Often very similar to LinkName. Will return
the true path to the file.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.CanonicalPathName</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Same as CanonicalName, excluding the base
name.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.BundleName</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Returns the name of the bundle implies
<a href="qabstractfileengine.html#FileFlag-enum">BundleType</a> is
set.</td>
</tr>
</table>
<p><b>See also</b> <a href="qabstractfileengine.html#fileName">fileName</a>() and <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="FileOwner-enum" />QAbstractFileEngine.FileOwner</h3><table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.OwnerUser</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The user who owns the file.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.OwnerGroup</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The group who owns the file.</td>
</tr>
</table>
<p><b>See also</b> <a href="qabstractfileengine.html#owner">owner</a>(), <a href="qabstractfileengine.html#ownerId">ownerId</a>(), and <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="FileTime-enum" />QAbstractFileEngine.FileTime</h3><p>These are used by the <a href="qabstractfileengine.html#fileTime">fileTime</a>() function.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.CreationTime</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">When the file was created.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QAbstractFileEngine.ModificationTime</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">When the file was most recently modified.</td>
</tr>
<tr>
<td class="topAlign"><tt>QAbstractFileEngine.AccessTime</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">When the file was most recently accessed (e.g.
read or written to).</td>
</tr>
</table>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractFileEngine" />QAbstractFileEngine.__init__ (<i>self</i>)</h3><p>Constructs a new <a href="qabstractfileengine.html">QAbstractFileEngine</a> that does not
refer to any file or directory.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="atEnd" />bool QAbstractFileEngine.atEnd (<i>self</i>)</h3><p>Returns true if the current position is at the end of the file;
otherwise, returns false.</p>
<p>This function bases its behavior on calling <a href="qabstractfileengine.html#extension">extension</a>() with <a href="qabstractfileengine.html#Extension-enum">AtEndExtension</a>. If
the engine does not support this extension, false is returned.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#extension">extension</a>(), <a href="qabstractfileengine.html#supportsExtension">supportsExtension</a>(),
and <a href="qfile.html#atEnd">QFile.atEnd</a>().</p>


<h3 class="fn"><a name="beginEntryList" /><a href="qabstractfileengineiterator.html">QAbstractFileEngineIterator</a> QAbstractFileEngine.beginEntryList (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</h3><p>Returns an instance of a <a href="qabstractfileengineiterator.html">QAbstractFileEngineIterator</a>
using <i>filters</i> for entry filtering and <i>filterNames</i> for
name filtering. This function is called by <a href="qdiriterator.html">QDirIterator</a> to initiate directory
iteration.</p>
<p><a href="qdiriterator.html">QDirIterator</a> takes ownership of
the returned instance, and deletes it when it's done.</p>
<p><b>See also</b> <a href="qdiriterator.html">QDirIterator</a>.</p>


<h3 class="fn"><a name="caseSensitive" />bool QAbstractFileEngine.caseSensitive (<i>self</i>)</h3><p>Should return true if the underlying file system is
case-sensitive; otherwise return false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>


<h3 class="fn"><a name="close" />bool QAbstractFileEngine.close (<i>self</i>)</h3><p>Closes the file, returning true if successful; otherwise returns
false.</p>
<p>The default implementation always returns false.</p>


<h3 class="fn"><a name="copy" />bool QAbstractFileEngine.copy (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Copies the contents of this file to a file with the name
<i>newName</i>. Returns true on success; otherwise, false is
returned.</p>


<h3 class="fn"><a name="create" /><a href="qabstractfileengine.html">QAbstractFileEngine</a> QAbstractFileEngine.create (QString&#160;<i>fileName</i>)</h3><p>Creates and returns a <a href="qabstractfileengine.html">QAbstractFileEngine</a> suitable for
processing <i>fileName</i>.</p>
<p>You should not need to call this function; use <a href="qfile.html">QFile</a>, <a href="qfileinfo.html">QFileInfo</a> or
<a href="qdir.html">QDir</a> directly instead.</p>
<p>If you reimplemnt this function, it should only return file
engines that knows how to handle <i>fileName</i>; otherwise, it
should return 0.</p>
<p><b>See also</b> <a href="qabstractfileenginehandler.html">QAbstractFileEngineHandler</a>.</p>


<h3 class="fn"><a name="entryList" />QStringList QAbstractFileEngine.entryList (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</h3><p>Requests that a list of all the files matching the
<i>filters</i> list based on the <i>filterNames</i> in the file
engine's directory are returned.</p>
<p>Should return an empty list if the file engine refers to a file
rather than a directory, or if the directory is unreadable or does
not exist or if nothing matches the specifications.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="error" /><a href="qfile.html#FileError-enum">QFile.FileError</a> QAbstractFileEngine.error (<i>self</i>)</h3><p>Returns the <a href="qfile.html#FileError-enum">QFile.FileError</a> that resulted from
the last failed operation. If <a href="qfile.html#FileError-enum">QFile.UnspecifiedError</a> is
returned, <a href="qfile.html">QFile</a> will use its own idea of
the error status.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setError">setError</a>(), <a href="qfile.html#FileError-enum">QFile.FileError</a>, and <a href="qabstractfileengine.html#errorString">errorString</a>().</p>


<h3 class="fn"><a name="errorString" />QString QAbstractFileEngine.errorString (<i>self</i>)</h3><p>Returns the human-readable message appropriate to the current
error reported by <a href="qabstractfileengine.html#error">error</a>(). If no suitable string
is available, an empty string is returned.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#error">error</a>().</p>


<h3 class="fn"><a name="fileFlags" /><a href="qabstractfileengine-fileflags.html">FileFlags</a> QAbstractFileEngine.fileFlags (<i>self</i>, <a href="qabstractfileengine-fileflags.html">FileFlags</a>&#160;<i>type</i>&#160;=&#160;QAbstractFileEngine.FileInfoAll)</h3><p>This function should return the set of OR'd flags that are true
for the file engine's file, and that are in the <i>type</i>'s OR'd
members.</p>
<p>In your reimplementation you can use the <i>type</i> argument as
an optimization hint and only return the OR'd set of members that
are true and that match those in <i>type</i>; in other words you
can ignore any members not mentioned in <i>type</i>, thus avoiding
some potentially expensive lookups or system calls.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="fileName" />QString QAbstractFileEngine.fileName (<i>self</i>, <a href="qabstractfileengine.html#FileName-enum">FileName</a>&#160;<i>file</i>&#160;=&#160;QAbstractFileEngine.DefaultName)</h3><p>Return the file engine's current file name in the format
specified by <i>file</i>.</p>
<p>If you don't handle some <tt>FileName</tt> possibilities, return
the file name set in <a href="qabstractfileengine.html#setFileName">setFileName</a>() when an
unhandled format is requested.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>() and
<a href="qabstractfileengine.html#FileName-enum">FileName</a>.</p>


<h3 class="fn"><a name="fileTime" /><a href="qdatetime.html">QDateTime</a> QAbstractFileEngine.fileTime (<i>self</i>, <a href="qabstractfileengine.html#FileTime-enum">FileTime</a>&#160;<i>time</i>)</h3><p>If <i>time</i> is <tt>CreationTime</tt>, return when the file
was created. If <i>time</i> is <tt>ModificationTime</tt>, return
when the file was most recently modified. If <i>time</i> is
<tt>AccessTime</tt>, return when the file was most recently
accessed (e.g. read or written). If the time cannot be determined
return QDateTime() (an invalid date time).</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>(), <a href="qdatetime.html">QDateTime</a>, <a href="qdatetime.html#isValid">QDateTime.isValid</a>(), and <a href="qabstractfileengine.html#FileTime-enum">FileTime</a>.</p>


<h3 class="fn"><a name="flush" />bool QAbstractFileEngine.flush (<i>self</i>)</h3><p>Flushes the open file, returning true if successful; otherwise
returns false.</p>
<p>The default implementation always returns false.</p>


<h3 class="fn"><a name="handle" />int QAbstractFileEngine.handle (<i>self</i>)</h3><p>Returns the native file handle for this file engine. This handle
must be used with care; its value and type are platform specific,
and using it will most likely lead to non-portable code.</p>


<h3 class="fn"><a name="isRelativePath" />bool QAbstractFileEngine.isRelativePath (<i>self</i>)</h3><p>Return true if the file referred to by this file engine has a
relative path; otherwise return false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="isSequential" />bool QAbstractFileEngine.isSequential (<i>self</i>)</h3><p>Returns true if the file is a sequential access device; returns
false if the file is a direct access device.</p>
<p>Operations involving <a href="qabstractfileengine.html#size">size</a>() and seek(int) are not
valid on sequential devices.</p>


<h3 class="fn"><a name="link" />bool QAbstractFileEngine.link (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Creates a link from the file currently specified by <a href="qabstractfileengine.html#fileName">fileName</a>() to
<i>newName</i>. What a link is depends on the underlying filesystem
(be it a shortcut on Windows or a symbolic link on Unix). Returns
true if successful; otherwise returns false.</p>


<h3 class="fn"><a name="map" />sip.voidptr QAbstractFileEngine.map (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>size</i>, <a href="qfile.html#MemoryMapFlags-enum">QFile.MemoryMapFlags</a>&#160;<i>flags</i>)</h3><p>Maps <i>size</i> bytes of the file into memory starting at
<i>offset</i>. Returns a pointer to the memory if successful;
otherwise returns false if, for example, an error occurs.</p>
<p>This function bases its behavior on calling <a href="qabstractfileengine.html#extension">extension</a>() with <a href="qabstractfileengine-mapextensionoption.html">MapExtensionOption</a>.
If the engine does not support this extension, 0 is returned.</p>
<p><i>flags</i> is currently not used, but could be used in the
future.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#unmap">unmap</a>() and <a href="qabstractfileengine.html#supportsExtension">supportsExtension</a>().</p>


<h3 class="fn"><a name="mkdir" />bool QAbstractFileEngine.mkdir (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>createParentDirectories</i>)</h3><p>Requests that the directory <i>dirName</i> be created. If
<i>createParentDirectories</i> is true, then any sub-directories in
<i>dirName</i> that don't exist must be created. If
<i>createParentDirectories</i> is false then any sub-directories in
<i>dirName</i> must already exist for the function to succeed. If
the operation succeeds return true; otherwise return false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>(), <a href="qabstractfileengine.html#rmdir">rmdir</a>(), and <a href="qabstractfileengine.html#isRelativePath">isRelativePath</a>().</p>


<h3 class="fn"><a name="open" />bool QAbstractFileEngine.open (<i>self</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a>&#160;<i>openMode</i>)</h3><p>Opens the file in the specified <i>mode</i>. Returns true if the
file was successfully opened; otherwise returns false.</p>
<p>The <i>mode</i> is an OR combination of <a href="qiodevice.html#OpenModeFlag-enum">QIODevice.OpenMode</a> and
QIODevice.HandlingMode values.</p>


<h3 class="fn"><a name="owner" />QString QAbstractFileEngine.owner (<i>self</i>, <a href="qabstractfileengine.html#FileOwner-enum">FileOwner</a>)</h3><p>If <i>owner</i> is <tt>OwnerUser</tt> return the name of the
user who owns the file. If <i>owner</i> is <tt>OwnerGroup</tt>
return the name of the group that own the file. If you can't
determine the owner return QString().</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#ownerId">ownerId</a>(), <a href="qabstractfileengine.html#setFileName">setFileName</a>(), and
<a href="qabstractfileengine.html#FileOwner-enum">FileOwner</a>.</p>


<h3 class="fn"><a name="ownerId" />int QAbstractFileEngine.ownerId (<i>self</i>, <a href="qabstractfileengine.html#FileOwner-enum">FileOwner</a>)</h3><p>If <i>owner</i> is <tt>OwnerUser</tt> return the ID of the user
who owns the file. If <i>owner</i> is <tt>OwnerGroup</tt> return
the ID of the group that own the file. If you can't determine the
owner return -2.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#owner">owner</a>(), <a href="qabstractfileengine.html#setFileName">setFileName</a>(), and
<a href="qabstractfileengine.html#FileOwner-enum">FileOwner</a>.</p>


<h3 class="fn"><a name="pos" />int QAbstractFileEngine.pos (<i>self</i>)</h3><p>Returns the current file position.</p>
<p>This is the position of the data read/write head of the
file.</p>


<h3 class="fn"><a name="read" />object QAbstractFileEngine.read (<i>self</i>, int&#160;<i>maxlen</i>)</h3><p>Reads a number of characters from the file into <i>data</i>. At
most <i>maxlen</i> characters will be read.</p>
<p>Returns -1 if a fatal error occurs, or 0 if there are no bytes
to read.</p>


<h3 class="fn"><a name="readLine" />object QAbstractFileEngine.readLine (<i>self</i>, int&#160;<i>maxlen</i>)</h3><p>This function reads one line, terminated by a '\n' character,
from the file info <i>data</i>. At most <i>maxlen</i> characters
will be read. The end-of-line character is included.</p>


<h3 class="fn"><a name="remove" />bool QAbstractFileEngine.remove (<i>self</i>)</h3><p>Requests that the file is deleted from the file system. If the
operation succeeds return true; otherwise return false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>() and
<a href="qabstractfileengine.html#rmdir">rmdir</a>().</p>


<h3 class="fn"><a name="rename" />bool QAbstractFileEngine.rename (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Requests that the file be renamed to <i>newName</i> in the file
system. If the operation succeeds return true; otherwise return
false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="rmdir" />bool QAbstractFileEngine.rmdir (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>recurseParentDirectories</i>)</h3><p>Requests that the directory <i>dirName</i> is deleted from the
file system. When <i>recurseParentDirectories</i> is true, then any
empty parent-directories in <i>dirName</i> must also be deleted. If
<i>recurseParentDirectories</i> is false, only the <i>dirName</i>
leaf-node should be deleted. In most file systems a directory
cannot be deleted using this function if it is non-empty. If the
operation succeeds return true; otherwise return false.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setFileName">setFileName</a>(), <a href="qabstractfileengine.html#remove">remove</a>(), <a href="qabstractfileengine.html#mkdir">mkdir</a>(), and <a href="qabstractfileengine.html#isRelativePath">isRelativePath</a>().</p>


<h3 class="fn"><a name="seek" />bool QAbstractFileEngine.seek (<i>self</i>, int&#160;<i>pos</i>)</h3><p>Sets the file position to the given <i>offset</i>. Returns true
if the position was successfully set; otherwise returns false.</p>
<p>The offset is from the beginning of the file, unless the file is
sequential.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#isSequential">isSequential</a>().</p>


<h3 class="fn"><a name="setError" />QAbstractFileEngine.setError (<i>self</i>, <a href="qfile.html#FileError-enum">QFile.FileError</a>&#160;<i>error</i>, QString&#160;<i>str</i>)</h3><p>Sets the error type to <i>error</i>, and the error string to
<i>errorString</i>. Call this function to set the error values
returned by the higher-level classes.</p>
<p><b>See also</b> <a href="qfile.html#error">QFile.error</a>(),
<a href="qiodevice.html#errorString">QIODevice.errorString</a>(),
and <a href="qiodevice.html#setErrorString">QIODevice.setErrorString</a>().</p>


<h3 class="fn"><a name="setFileName" />QAbstractFileEngine.setFileName (<i>self</i>, QString&#160;<i>file</i>)</h3><p>Sets the file engine's file name to <i>file</i>. This file name
is the file that the rest of the virtual functions will operate
on.</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#fileName">fileName</a>() and <a href="qabstractfileengine.html#rename">rename</a>().</p>


<h3 class="fn"><a name="setPermissions" />bool QAbstractFileEngine.setPermissions (<i>self</i>, int&#160;<i>perms</i>)</h3><p>Requests that the file's permissions be set to <i>perms</i>. The
argument perms will be set to the OR-ed together combination of
QAbstractFileEngine.FileInfo, with only the <a href="qabstractfileengine.html#FileFlag-enum">QAbstractFileEngine.PermsMask</a>
being honored. If the operations succceeds return true; otherwise
return false;</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#size">size</a>().</p>


<h3 class="fn"><a name="setSize" />bool QAbstractFileEngine.setSize (<i>self</i>, int&#160;<i>size</i>)</h3><p>Requests that the file be set to size <i>size</i>. If
<i>size</i> is larger than the current file then it is filled with
0's, if smaller it is simply truncated. If the operations succceeds
return true; otherwise return false;</p>
<p>This virtual function must be reimplemented by all
subclasses.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#size">size</a>().</p>


<h3 class="fn"><a name="size" />int QAbstractFileEngine.size (<i>self</i>)</h3><p>Returns the size of the file.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#setSize">setSize</a>().</p>


<h3 class="fn"><a name="unmap" />bool QAbstractFileEngine.unmap (<i>self</i>, sip.voidptr&#160;<i>ptr</i>)</h3><p>Unmaps the memory <i>address</i>. Returns true if the unmap
succeeds; otherwise returns false.</p>
<p>This function bases its behavior on calling <a href="qabstractfileengine.html#extension">extension</a>() with <a href="qabstractfileengine-unmapextensionoption.html">UnMapExtensionOption</a>.
If the engine does not support this extension, false is
returned.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qabstractfileengine.html#map">map</a>()
and <a href="qabstractfileengine.html#supportsExtension">supportsExtension</a>().</p>


<h3 class="fn"><a name="write" />int QAbstractFileEngine.write (<i>self</i>, bytes&#160;<i>data</i>)</h3><p>Writes <i>len</i> bytes from <i>data</i> to the file. Returns
the number of characters written on success; otherwise returns
-1.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.12.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>