File: file.h.html

package info (click to toggle)
rudiments 0.31-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,516 kB
  • ctags: 3,248
  • sloc: asm: 23,776; cpp: 22,792; sh: 7,769; ansic: 1,769; makefile: 1,054; xml: 169; perl: 19
file content (770 lines) | stat: -rw-r--r-- 87,837 bytes parent folder | download | duplicates (2)
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
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
<html>
<head>
<title>~/src/firstworks/rudiments-0.31/include/rudiments/file.h.html</title>
<meta name="Generator" content="Vim/7.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>
<font color="#0000ff">// Copyright (c) 2002 David Muse</font>
<font color="#0000ff">// See the COPYING file for more information.</font>

<font color="#a020f0">#ifndef RUDIMENTS_FILE_H</font>
<font color="#a020f0">#define RUDIMENTS_FILE_H</font>

<font color="#a020f0">#include </font><font color="#ff00ff">&lt;rudiments/private/fileincludes.h&gt;</font>

<font color="#0000ff">// The file class provides methods for interacting with files and for </font>
<font color="#0000ff">// discovering the properties associated with a file such as permissions,</font>
<font color="#0000ff">// ownership, size, etc.</font>
<font color="#0000ff">//</font>
<font color="#0000ff">// Many of the static methods are just provided for convenience.  Use them</font>
<font color="#0000ff">// if you need to get a a single property or perform a single operation.</font>
<font color="#0000ff">//</font>
<font color="#0000ff">// If you need to get multiple properties or perform multiple operations,</font>
<font color="#0000ff">// create an instance of the class, call open(), then use the non-static</font>
<font color="#0000ff">// methods.</font>

<font color="#a020f0">#ifdef RUDIMENTS_NAMESPACE</font>
<font color="#2e8b57"><b>namespace</b></font> rudiments {
<font color="#a020f0">#endif</font>

<font color="#2e8b57"><b>class</b></font> fileprivate;

<font color="#2e8b57"><b>class</b></font> file : <font color="#a52a2a"><b>public</b></font> filedescriptor {
        <font color="#a52a2a"><b>public</b></font>:

                        file();
                        <font color="#0000ff">// Creates an uninitialized instance of the file class.</font>
                        file(<font color="#2e8b57"><b>const</b></font> file &amp;f);
                file    &amp;<font color="#a52a2a"><b>operator</b></font>=(<font color="#2e8b57"><b>const</b></font> file &amp;f);
                <font color="#2e8b57"><b>virtual</b></font>       ~file();


                <font color="#0000ff">// These methods open the file &quot;name&quot; using &quot;flags&quot;.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  open(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>int</b></font> flags);
                <font color="#2e8b57"><b>bool</b></font>  open(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>int</b></font> flags, mode_t perms);
                        <font color="#0000ff">// If flags contains O_CREAT and the file doesn't</font>
                        <font color="#0000ff">// already exist, it will be created with permissions</font>
                        <font color="#0000ff">// &quot;perms&quot;.</font>


                <font color="#0000ff">// These methods creates the file &quot;name&quot; with permissions</font>
                <font color="#0000ff">// &quot;perms&quot;.  If the file already exists, it will be truncated.</font>
                <font color="#2e8b57"><b>bool</b></font>  create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms);
                        <font color="#0000ff">// Returns true on success and false on failure.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms, <font color="#2e8b57"><b>float</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms, <font color="#2e8b57"><b>double</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms, <font color="#2e8b57"><b>char</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string);
                        <font color="#0000ff">// Sets the initial contents to &quot;string&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string, <font color="#2e8b57"><b>size_t</b></font> size);
                        <font color="#0000ff">// Sets the initial contents to &quot;string&quot; of size &quot;size&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       create(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>void</b></font> *data, <font color="#2e8b57"><b>size_t</b></font> size);
                        <font color="#0000ff">// Sets the initial contents to &quot;data&quot; of size &quot;size&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>


                <font color="#0000ff">// These methods read the contents of the file into a buffer.</font>
                <font color="#2e8b57"><b>char</b></font>  *getContents();
                        <font color="#0000ff">// Allocates a string large enough to accommodate the</font>
                        <font color="#0000ff">// contents of the currently opened file, reads the</font>
                        <font color="#0000ff">// contents of the file into the string and returns the</font>
                        <font color="#0000ff">// string.  The string must be freed by the calling</font>
                        <font color="#0000ff">// program.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// If the file contains no data, then a string of length</font>
                        <font color="#0000ff">// zero is returned.  If an error occurs then a NULL</font>
                        <font color="#0000ff">// is returned.</font>
                <font color="#2e8b57"><b>ssize_t</b></font>       getContents(<font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *buffer, <font color="#2e8b57"><b>size_t</b></font> buffersize);
                        <font color="#0000ff">// Reads the contents of the currently open file into</font>
                        <font color="#0000ff">// &quot;buffer&quot; of length &quot;buffersize&quot;.  If the file is</font>
                        <font color="#0000ff">// larger than &quot;buffersize&quot; then only &quot;buffersize&quot; bytes</font>
                        <font color="#0000ff">// of the file will be read into &quot;buffer&quot;.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Returns the number of bytes copied into &quot;buffer&quot; or</font>
                        <font color="#0000ff">// -1 on error.</font>


                <font color="#0000ff">// These methods truncate the file.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  truncate() <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Truncates all data in the file, resulting in</font>
                        <font color="#0000ff">// a file of zero length.</font>
                <font color="#2e8b57"><b>bool</b></font>  truncate(off64_t length) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Truncates all data beyond the first &quot;length&quot;</font>
                        <font color="#0000ff">// bytes, resulting in a file of &quot;length&quot; bytes.</font>


                <font color="#0000ff">// These methods allow you to get or set the position at which</font>
                <font color="#0000ff">// the next read or write will occur.  Each returns the position</font>
                <font color="#0000ff">// relative to the beginning of the file on success or -1 on</font>
                <font color="#0000ff">// failure.</font>
                off64_t getCurrentPosition() <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Returns the position at which the next read or</font>
                        <font color="#0000ff">// write will occur.</font>
                off64_t setPositionRelativeToBeginning(off64_t offset) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Sets the position to the beginning of the</font>
                        <font color="#0000ff">// file + &quot;offset&quot; bytes.</font>
                off64_t setPositionRelativeToCurrent(off64_t offset) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Sets the position to the current</font>
                        <font color="#0000ff">// position + &quot;offset&quot; bytes.</font>
                off64_t setPositionRelativeToEnd(off64_t offset) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Sets the position to the end of the</font>
                        <font color="#0000ff">// file + &quot;offset&quot; bytes.</font>


                <font color="#0000ff">// The following methods allow you to lock files or regions</font>
                <font color="#0000ff">// of files.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// The tryLock() methods attempt to lock and return success if</font>
                <font color="#0000ff">// the lock can be established immediately or false otherwise.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// The lock() methods block until a lock is established and</font>
                <font color="#0000ff">// return true on success or false if an error occurs.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// The checkLock() methods check to see if a lock can be</font>
                <font color="#0000ff">// established but do not actually lock anything.  If a lock</font>
                <font color="#0000ff">// can be established, they return true. Otherwise they return</font>
                <font color="#0000ff">// false and populate the fields in the supplied flock struct</font>
                <font color="#0000ff">// with information about one of the conflicting locks.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// The unlock() methods attempt to release a previosly</font>
                <font color="#0000ff">// established lock and return true on success or false on</font>
                <font color="#0000ff">// error.</font>

                <font color="#0000ff">// These methods allow you to lock the entire file.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockFile(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockFile(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockFile(<font color="#2e8b57"><b>short</b></font> type, <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockFile() <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock an arbitrary</font>
                <font color="#0000ff">// region of the file.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockRegion(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                        off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRegion(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                        off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRegion(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                off64_t len,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRegion(off64_t start, off64_t len) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock an arbitrary region of the</font>
                <font color="#0000ff">// file relative to the current position.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  tryLockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                        off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                        off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t len,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                off64_t len,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockFromCurrent(off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockFromCurrent(off64_t start, off64_t len) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock an arbitrary region of the</font>
                <font color="#0000ff">// file relative to the end of the file.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  tryLockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t len,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                off64_t len,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockFromEnd(off64_t len) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockFromEnd(off64_t start, off64_t len) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock &quot;the remainder&quot; of a file</font>
                <font color="#0000ff">// starting at a given offset.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockRemainder(<font color="#2e8b57"><b>short</b></font> type, off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRemainder(<font color="#2e8b57"><b>short</b></font> type, off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRemainder(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRemainder(off64_t start) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock &quot;the remainder&quot; of a file</font>
                <font color="#0000ff">// relative to the current position.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  tryLockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type,
                                                        off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type,
                                                        off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRemainderFromCurrent(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRemainderFromCurrent() <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRemainderFromCurrent(off64_t start) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allow you to lock &quot;the remainder&quot; of a file</font>
                <font color="#0000ff">// relative to the end of the file.</font>
                <font color="#2e8b57"><b>bool</b></font>  tryLockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  tryLockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  lockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  checkLockRemainderFromEnd(<font color="#2e8b57"><b>short</b></font> type, off64_t start,
                                                <font color="#2e8b57"><b>struct</b></font> flock *lck) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRemainderFromEnd() <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  unlockRemainderFromEnd(off64_t start) <font color="#2e8b57"><b>const</b></font>;


                <font color="#0000ff">// These methods allow you to advise the kernel that you are</font>
                <font color="#0000ff">// going to access a region of a file in a particular manner.</font>
                <font color="#0000ff">// The kernel can then perform some optimisations.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// In these methods, the region of the file begins at &quot;start&quot;</font>
                <font color="#0000ff">// and continues for &quot;len&quot; bytes.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// These methods return true on success and false on failure.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// On operating systems don't support these methods, they</font>
                <font color="#0000ff">// return true but don't actually do anything.</font>
                <font color="#2e8b57"><b>bool</b></font>  sequentialAccess(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// The region will be accessed in sequential order.</font>
                <font color="#2e8b57"><b>bool</b></font>  randomAccess(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// The region will be accessed in random order.</font>
                <font color="#2e8b57"><b>bool</b></font>  onlyOnce(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// The region will be only be accessed once.</font>
                <font color="#2e8b57"><b>bool</b></font>  willNeed(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// The region will be accessed in the near future.</font>
                <font color="#2e8b57"><b>bool</b></font>  wontNeed(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// The region will not be accessed in the near future.</font>
                <font color="#2e8b57"><b>bool</b></font>  normalAccess(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Removes any advice that has previously been applied</font>
                        <font color="#0000ff">// to the region.</font>


                <font color="#2e8b57"><b>bool</b></font>  reserve(off64_t start, <font color="#2e8b57"><b>size_t</b></font> len) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Reserves space on the storage medium such that a</font>
                        <font color="#0000ff">// write to the region starting at &quot;start&quot; and</font>
                        <font color="#0000ff">// continuing for &quot;len&quot; bytes will not fail due to</font>
                        <font color="#0000ff">// lack of storage space.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Returns true if the region can be reserved and</font>
                        <font color="#0000ff">// false otherwise.</font>


                <font color="#0000ff">// Changes to files are often cached in system ram, these</font>
                <font color="#0000ff">// methods makes sure that those changes are copied</font>
                <font color="#0000ff">// to the storage medium that the file resides on.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// Returns true on success and false on failure.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// Note that if a hard disk has on-board write cache</font>
                <font color="#0000ff">// enabled, this method only assures that the changes</font>
                <font color="#0000ff">// has been copied into the disk's write cache, not</font>
                <font color="#0000ff">// necessarily to the disk itself.</font>
                <font color="#2e8b57"><b>bool</b></font>  sync() <font color="#2e8b57"><b>const</b></font> ;
                <font color="#2e8b57"><b>bool</b></font>  dataSync() <font color="#2e8b57"><b>const</b></font> ;
                        <font color="#0000ff">// Similar to sync() but does not wait for the file's</font>
                        <font color="#0000ff">// last-access or last-modification times to be copied.</font>


                <font color="#0000ff">// By default, the open() and create() methods call </font>
                <font color="#0000ff">// getCurrentProperties() so the other methods of this class</font>
                <font color="#0000ff">// will return valid data about the file immediately.  These</font>
                <font color="#0000ff">// methods alter that behaviour.</font>
                <font color="#2e8b57"><b>void</b></font>  getCurrentPropertiesOnOpen();
                <font color="#2e8b57"><b>void</b></font>  dontGetCurrentPropertiesOnOpen();

                <font color="#2e8b57"><b>bool</b></font>  getCurrentProperties();
                        <font color="#0000ff">// Get the current file properties.</font>
                        <font color="#0000ff">// </font>
                        <font color="#0000ff">// Returns true on success and false on failure.</font>

                <font color="#0000ff">// These methods return various file properties.</font>
                mode_t          getPermissions() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the permissions</font>
                uid_t           getOwnerUserId() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the user id of the file's owner</font>
                gid_t           getOwnerGroupId() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the group id of the file's owner</font>
                off64_t         getSize() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the number of bytes in the file</font>
                blksize_t       getBlockSize() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the blocksize to use for most</font>
                                <font color="#0000ff">// efficient I/O with the file or -1 for</font>
                                <font color="#0000ff">// systems don't support this</font>
                blkcnt_t        getBlockCount() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the number of blocks allocated for</font>
                                <font color="#0000ff">// the file or -1 for systems don't support this</font>
                <font color="#2e8b57"><b>int</b></font>           isSocket() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a socket,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isSymbolicLink() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a symbolic link,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isRegularFile() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a regular file,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isBlockDevice() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a block device,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isDirectory() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a directory,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isCharacterDevice() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a character device,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>int</b></font>           isFifo() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns 1 if the file is a fifo,</font>
                                <font color="#0000ff">// 0 if it's not or -1 on error.</font>
                <font color="#2e8b57"><b>time_t</b></font>                getLastAccessTime() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the time of last access</font>
                <font color="#2e8b57"><b>time_t</b></font>                getLastModificationTime() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the time of last modification</font>
                                <font color="#0000ff">//</font>
                                <font color="#0000ff">// Modification time IS NOT affected by chmod,</font>
                                <font color="#0000ff">// chown, or creating links.</font>
                <font color="#2e8b57"><b>time_t</b></font>                getLastChangeTime() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// returns the time of last change</font>
                                <font color="#0000ff">//</font>
                                <font color="#0000ff">// Change time IS affected by chmod, chown and</font>
                                <font color="#0000ff">// creating links.</font>
                dev_t           getDevice() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// return the device of the file</font>
                dev_t           getDeviceType() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// return the device type of the file</font>
                ino_t           getInode() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// return the inode of the file</font>
                nlink_t         getNumberOfHardLinks() <font color="#2e8b57"><b>const</b></font>;
                                <font color="#0000ff">// return the number of hard links to the file</font>

                <font color="#0000ff">// These methods change the user and/or group</font>
                <font color="#0000ff">// that owns the file.</font>
                <font color="#0000ff">//</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  changeOwner(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newuser,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newgroup) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  changeOwner(uid_t uid, gid_t gid) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  changeOwnerUserId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newuser) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  changeOwnerUserId(uid_t uid) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  changeOwnerGroupId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newgroup) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  changeOwnerGroupId(gid_t gid) <font color="#2e8b57"><b>const</b></font>;

                <font color="#2e8b57"><b>bool</b></font>  canChangeOwner() <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Returns true if any of the changeOwner()</font>
                        <font color="#0000ff">// methods are allowed on &quot;filename&quot; and</font>
                        <font color="#0000ff">// false otherwise.</font>

                <font color="#2e8b57"><b>long</b></font>  maxLinks() <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Returns the maximum number of links that can be</font>
                        <font color="#0000ff">// created to &quot;filename&quot;.</font>


                <font color="#0000ff">// Some filesystems support extended file attributes.  These</font>
                <font color="#0000ff">// methods provide an interface for getting and setting those</font>
                <font color="#0000ff">// attributes.</font>

                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> * <font color="#2e8b57"><b>const</b></font>    *listAttributes() <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Returns a NULL terminated array of attributes or</font>
                        <font color="#0000ff">// NULL if an error occurred.</font>


                <font color="#0000ff">// These methods reads the value of the named attribute into</font>
                <font color="#0000ff">// the supplied (preallocated) buffer.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>short</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>long</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>float</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>double</b></font> *number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>char</b></font> *character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>bool</b></font> *value) <font color="#2e8b57"><b>const</b></font>;

                <font color="#0000ff">// These methods allocate a buffer, read the value into it</font>
                <font color="#0000ff">// and return the allocated buffer.  Some of these methods also</font>
                <font color="#0000ff">// return the size of the buffer.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> **string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>char</b></font> **string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> **string,
                                        <font color="#2e8b57"><b>size_t</b></font> *size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>char</b></font> **string, <font color="#2e8b57"><b>size_t</b></font> *size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  getAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>void</b></font> **buffer, <font color="#2e8b57"><b>size_t</b></font> *size) <font color="#2e8b57"><b>const</b></font>;


                <font color="#0000ff">// These methods create a new attribute.</font>
                <font color="#0000ff">// They return true on success and false on failure and will</font>
                <font color="#0000ff">// fail if the attribute already exists.</font>
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>float</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>double</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>bool</b></font> value) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string, <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  createAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>void</b></font> *buffer, <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;


                <font color="#0000ff">// These method replace an existing attribute.</font>
                <font color="#0000ff">// They return true on success and false on failure and will</font>
                <font color="#0000ff">// fail if the attribute doesn't already exist.</font>
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>float</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>double</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>bool</b></font> value) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  replaceAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>void</b></font> *buffer,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;


                <font color="#0000ff">// These methods create new attributes or replace existing</font>
                <font color="#0000ff">// attributes.  They returns true on success and false on</font>
                <font color="#0000ff">// failure.</font>
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>short</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>long</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>float</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>double</b></font> number) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>char</b></font> character) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, <font color="#2e8b57"><b>bool</b></font> value) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *string,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;
                <font color="#2e8b57"><b>bool</b></font>  setAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>void</b></font> *buffer,
                                                <font color="#2e8b57"><b>size_t</b></font> size) <font color="#2e8b57"><b>const</b></font>;


                <font color="#2e8b57"><b>bool</b></font>  removeAttribute(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name) <font color="#2e8b57"><b>const</b></font>;
                        <font color="#0000ff">// Removes attribute &quot;name&quot;.</font>
                        <font color="#0000ff">// Returns true on success and false on failure.</font>

                <font color="#2e8b57"><b>struct</b></font> stat   *getStat();
                                <font color="#0000ff">// Returns a pointer to the &quot;stat&quot; struct</font>
                                <font color="#0000ff">// used internally.</font>


                <font color="#0000ff">// These methods creates the file &quot;name&quot; with permissions</font>
                <font color="#0000ff">// &quot;perms&quot;.  If the file already exists, it will be truncated.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms);
                        <font color="#0000ff">// Returns true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>short</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>long</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>float</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>double</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>char</b></font> number);
                        <font color="#0000ff">// Sets the initial contents to &quot;number&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string);
                        <font color="#0000ff">// Sets the initial contents to &quot;string&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *string, <font color="#2e8b57"><b>size_t</b></font> size);
                        <font color="#0000ff">// Sets the initial contents to &quot;string&quot; of size &quot;size&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>ssize_t</b></font>        createFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name, mode_t perms,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>void</b></font> *data, <font color="#2e8b57"><b>size_t</b></font> size);
                        <font color="#0000ff">// Sets the initial contents to &quot;data&quot; of size &quot;size&quot;.</font>
                        <font color="#0000ff">// Returns the number of bytes written or -1 on error.</font>


                <font color="#0000ff">// These methods allow you to create special kinds of files.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   createFifo(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, mode_t perms);
                        <font color="#0000ff">// Creates a fifo called &quot;filename&quot; with permissions</font>
                        <font color="#0000ff">// &quot;perms&quot;.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Returns true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    createTemporaryFile(<font color="#2e8b57"><b>char</b></font> *templatefilename);
                        <font color="#0000ff">// Creates a temporary file using &quot;templatefilename&quot;</font>
                        <font color="#0000ff">// as a template.  The last 6 characters of</font>
                        <font color="#0000ff">// &quot;templatefilename&quot; must be XXXXXX and</font>
                        <font color="#0000ff">// &quot;templatefilename&quot; will be modified to contain the</font>
                        <font color="#0000ff">// name of the file that was actually created.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Opens and returns the file descriptor handle of the</font>
                        <font color="#0000ff">// file on success and -1 on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   createHardLink(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *oldpath,
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newpath);
                        <font color="#0000ff">// Creates a hard link between &quot;oldpath&quot; and &quot;newpath&quot;.</font>
                        <font color="#0000ff">// Returns true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   createSymbolicLink(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *oldpath,
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newpath);
                        <font color="#0000ff">// Creates a symbolic link between &quot;oldpath&quot; and</font>
                        <font color="#0000ff">// &quot;newpath&quot;. Returns true on success and false on</font>
                        <font color="#0000ff">// failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>char</b></font>   *resolveSymbolicLink(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Returns the pathname of the file that the symbolic</font>
                        <font color="#0000ff">// link &quot;filename&quot; points to.  Returns NULL on failure.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Note that this method allocates a buffer for the</font>
                        <font color="#0000ff">// path internally and returns it.  The calling program</font>
                        <font color="#0000ff">// must deallocate this buffer.</font>


                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   rename(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *oldpath,
                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newpath);
                        <font color="#0000ff">// Renames &quot;oldpath&quot; to &quot;newpath&quot;.  Returns true on</font>
                        <font color="#0000ff">// success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   remove(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Removes file &quot;filename&quot;.  Returns true on success</font>
                        <font color="#0000ff">// and false on failure.  (Will not remove a directory).</font>


                <font color="#0000ff">// These methods truncate the file.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font>        <font color="#2e8b57"><b>bool</b></font>   truncate(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font>        <font color="#2e8b57"><b>bool</b></font>   truncate(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, off64_t length);


                <font color="#0000ff">// These methods read the contents of the file into a buffer.</font>
                <font color="#2e8b57"><b>static</b></font>        <font color="#2e8b57"><b>char</b></font>   *getContents(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name);
                        <font color="#0000ff">// Allocates a string large enough to accommodate the</font>
                        <font color="#0000ff">// contents of the file &quot;name&quot; , reads the contents of</font>
                        <font color="#0000ff">// the file into the string, terminates it with a NULL</font>
                        <font color="#0000ff">// and returns the string.</font>
                        <font color="#0000ff">// The string must be freed by the calling program.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// If the file contains no data, then a string of length</font>
                        <font color="#0000ff">// zero is returned.  If an error occurs then a NULL</font>
                        <font color="#0000ff">// is returned.</font>
                <font color="#2e8b57"><b>static</b></font>        <font color="#2e8b57"><b>ssize_t</b></font>        getContents(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *name,
                                                <font color="#2e8b57"><b>unsigned</b></font> <font color="#2e8b57"><b>char</b></font> *buffer,
                                                <font color="#2e8b57"><b>size_t</b></font> buffersize);
                        <font color="#0000ff">// Reads the contents of the file &quot;name&quot; into</font>
                        <font color="#0000ff">// &quot;buffer&quot; of length &quot;buffersize&quot;.  If the file is</font>
                        <font color="#0000ff">// larger than &quot;buffersize&quot; then only &quot;buffersize&quot; bytes</font>
                        <font color="#0000ff">// of the file will be read into &quot;buffer&quot;.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Returns the number of bytes copied into &quot;buffer&quot; or</font>
                        <font color="#0000ff">// -1 on error.</font>


                <font color="#0000ff">// These methods allow you to check various access statuses.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   exists(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Returns true if the file exists and false otherwise.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   readable(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Returns true if &quot;filename&quot; is readable by the user</font>
                        <font color="#0000ff">// or false otherwise.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   writeable(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Returns true if &quot;filename&quot; is writeable by the user</font>
                        <font color="#0000ff">// or false otherwise.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   executable(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Returns true if &quot;filename&quot; is executable by the user</font>
                        <font color="#0000ff">// or false otherwise.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   accessible(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, <font color="#2e8b57"><b>int</b></font> mode);
                        <font color="#0000ff">// Checks to see if &quot;filename&quot; exists, is readable,</font>
                        <font color="#0000ff">// is writeable and/or is executable by the user, based</font>
                        <font color="#0000ff">// on the value of &quot;mode&quot;.  Mode should be an or'ed</font>
                        <font color="#0000ff">// combination of F_OK (exists), R_OK (readable),</font>
                        <font color="#0000ff">// W_OK (writable) and X_OK (executable) flags.</font>
                        <font color="#0000ff">//</font>
                        <font color="#0000ff">// Returns true if the file meets the conditions set</font>
                        <font color="#0000ff">// by the mode and false otherwise.</font>


                <font color="#0000ff">// These methods return various file properties into the</font>
                <font color="#0000ff">// supplied buffers.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getPermissions(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                mode_t *perms);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getOwnerUserId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                uid_t *uid);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getOwnerGroupId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                gid_t *gid);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getSize(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                off64_t *size);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getBlockSize(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                blksize_t *size);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getBlockCount(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                blkcnt_t *blocks);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isSocket(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isSymbolicLink(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isRegularFile(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isBlockDevice(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isDirectory(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isCharacterDevice(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>int</b></font>    isFifo(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getLastAccessTime(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> *atime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getLastModificationTime(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> *mtime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getLastChangeTime(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> *ctime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getDevice(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, dev_t *dev);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getDeviceType(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        dev_t *devtype);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getInode(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, ino_t *inode);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   getNumberOfHardLinks(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        nlink_t *nlink);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwner(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newuser,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newgroup);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwner(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                uid_t uid, gid_t gid);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwnerUserId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newuser);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwnerUserId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        uid_t uid);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwnerGroupId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *newgroup);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   changeOwnerGroupId(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        gid_t gid);

                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   canChangeOwner(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                                <font color="#0000ff">// Returns true if any of the changeOwner()</font>
                                <font color="#0000ff">// methods are allowed on &quot;filename&quot; and</font>
                                <font color="#0000ff">// false otherwise.</font>


                <font color="#0000ff">// These methods allow you to override the last access and/or</font>
                <font color="#0000ff">// modification time of a file.</font>
                <font color="#0000ff">// They return true on success and false on failure.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   setLastAccessTime(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> lastaccesstime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   setLastModificationTime(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> lastmodtime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   setLastAccessAndModificationTimes(
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                        <font color="#2e8b57"><b>time_t</b></font> lastaccesstime,
                                                        <font color="#2e8b57"><b>time_t</b></font> lastmodtime);
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>bool</b></font>   setLastAccessAndModificationTimes(
                                                        <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                        <font color="#0000ff">// Sets the last access and modification times of</font>
                        <font color="#0000ff">// &quot;filename&quot; to now.</font>


                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>char</b></font>   *dirname(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                                <font color="#0000ff">// Returns the directory portion of &quot;filename&quot;.</font>
                                <font color="#0000ff">// This method allocates a buffer internally</font>
                                <font color="#0000ff">// and returns it.  The calling program must</font>
                                <font color="#0000ff">// deallocate the buffer.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>char</b></font>   *basename(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                                <font color="#0000ff">// Returns the non-directory portion of</font>
                                <font color="#0000ff">// &quot;filename&quot;.</font>
                                <font color="#0000ff">// This method allocates a buffer internally</font>
                                <font color="#0000ff">// and returns it.  The calling program must</font>
                                <font color="#0000ff">// deallocate the buffer.</font>
                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>char</b></font>   *basename(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename,
                                                <font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *suffix);
                                <font color="#0000ff">// Returns the non-directory portion of</font>
                                <font color="#0000ff">// &quot;filename&quot;, truncating &quot;suffix&quot;.</font>
                                <font color="#0000ff">// This method allocates a buffer internally</font>
                                <font color="#0000ff">// and returns it.  The calling program must</font>
                                <font color="#0000ff">// deallocate the buffer.</font>


                <font color="#2e8b57"><b>static</b></font> key_t  generateKey(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename, <font color="#2e8b57"><b>int</b></font> id);
                                <font color="#0000ff">// Generates a key based on &quot;filename&quot; and the</font>
                                <font color="#0000ff">// least signifigant 8 bits of id (which must</font>
                                <font color="#0000ff">// be non-zero) suitable for use with</font>
                                <font color="#0000ff">// semaphores, shared memory segments and</font>
                                <font color="#0000ff">// message queues.</font>

                <font color="#2e8b57"><b>static</b></font> <font color="#2e8b57"><b>long</b></font>   maxLinks(<font color="#2e8b57"><b>const</b></font> <font color="#2e8b57"><b>char</b></font> *filename);
                                <font color="#0000ff">// Returns the maximum number of links that</font>
                                <font color="#0000ff">// can be created to &quot;filename&quot;.</font>

<font color="#a020f0">        #include </font><font color="#ff00ff">&lt;rudiments/private/file.h&gt;</font>
};

<font color="#a020f0">#ifdef RUDIMENTS_NAMESPACE</font>
}
<font color="#a020f0">#endif</font>

<font color="#a020f0">#endif</font>
</pre>
</body>
</html>