File: fileutil.xml

package info (click to toggle)
lazarus 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 275,760 kB
  • sloc: pascal: 2,341,904; xml: 509,420; makefile: 348,726; cpp: 93,608; sh: 3,387; java: 609; perl: 297; sql: 222; ansic: 137
file content (2708 lines) | stat: -rw-r--r-- 86,115 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
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
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
<?xml version="1.0" encoding="UTF-8"?>
<!--

Documentation for LCL (Lazarus Component Library) and LazUtils (Lazarus 
Utilities) are published under the Creative Commons Attribution-ShareAlike 4.0 
International public license.

https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/docs/cc-by-sa-4-0.txt

Copyright (c) 1997-2025, by the Lazarus Development Team.

-->
<fpdoc-descriptions>
<package name="lazutils">
<!--
=======================================================================
FileUtil
=======================================================================
-->
<module name="FileUtil">
<short>
Miscellaneous routines, types, and classes for manipulating files, file 
names, and paths.
</short>
<descr>
<p>
<file>fileutils.pas</file> contains routines, types, and classes used to 
maintain compatibility with the FileUtil unit in Delphi. File routines that 
deal with UTF-8 file names are located in the <file>LazFileUtils</file> unit.
</p>
<p>
File name handling in the unit is platform- or OS-specific. For the Windows, 
Darwin (macOS), and Amiga platforms, file names are <b>NOT</b> case 
sensitive. In addition, under Darwin, the <b>NotLiteralFilenames</b> define 
is enabled. This indicates that file names cannot be compared using the 
<b>=</b> string operator.
</p>
<p>
This unit contains basic functions similar to those in the RTL, but use UTF-8 
instead of the default system encoding. Please note that AnsiToUTF8 and 
UTF8ToAnsi need a widestring manager under Linux, BSD, and macOS. Normally 
these operating systems use UTF-8 as the system encoding so the 
WideStringManager is not needed.
</p>
<p>
<file>fileutil.pas</file> is part of the <file>LazUtils</file> package.
</p>
</descr>

<!-- unresolved type reference Visibility: default -->
<element name="Classes"/>
<element name="SysUtils"/>
<element name="StrUtils"/>
<element name="Masks"/>
<element name="LazUTF8"/>
<element name="LazFileUtils"/>
<element name="Contnrs"/>

<element name="UTF8FileHeader">
<short>
Byte Order Mark (BOM) used at the beginning of UTF-8-encoded files.
</short>
<descr/>
<seealso/>
</element>

<element name="FilenamesCaseSensitive">
<short>
When <b>True</b>, uppercase and lowercase file names are equivalent.
</short>
<descr>
<p>
FilenamesCaseSensitive is present when the <b>CaseInsensitiveFilenames</b> 
compiler define exists.
</p>
</descr>
<seealso/>
</element>

<element name="FilenamesLiteral">
<short>
When <b>True</b>, file names can be compared using the <b>=</b> string 
operator.
</short>
<descr>
<p>
FilenamesLiteral is present when the <b>NotLiteralFilenames</b> compiler 
define exists.
</p>
</descr>
<seealso/>
</element>

<element name="ComparePhysicalFilenames">
<short>
Compares file names after resolving symbolic links.
</short>
<descr>
<p>
<var>ComparePhysicalFilenames</var>, like <var>CompareFileNames</var>, is 
used to compare file name using the case-sensitivity enforced for file names 
on the platform.
</p>
<p>
Calls <var>GetPhysicalFilename</var> to ensure that values in 
<var>Filename1</var> and <var>Filename2</var> are resolved to the actual file 
names on the local file system. This is significant for UNIX-like platforms 
where the file name arguments may be symbolic links on the file system.
</p>
<p>
Calls CompareFileNames in <file>LazFileUtils</file> to perform the comparison 
and get the return value for the routine.
</p>
</descr>
<seealso>
<link id="#lazutils.LazFileUtils.CompareFileNames">CompareFileNames</link>
<link id="#lazutils.LazFileUtils.GetPhysicalFilename">GetPhysicalFilename</link>
</seealso>
</element>
<element name="ComparePhysicalFilenames.Result">
<short>
Relative sort order for the compared values.
</short>
</element>
<element name="ComparePhysicalFilenames.Filename1">
<short>
First file name resolved and used in the comparison.
</short>
</element>
<element name="ComparePhysicalFilenames.Filename2">
<short>
Second file name resolved and used in the comparison.
</short>
</element>

<element name="CompareFilenames">
<short>
Compares two file names to see whether they are equal.
</short>
<descr>
<p>
<var>CompareFileNames</var> is an <var>Integer</var> function used to compare 
the specified file names (and lengths).
</p>
<p>
The <var>Filename1</var> and <var>Filename2</var> arguments are 
<var>PChar</var> types with pointers to the first character in each of the 
compared file names.The <var>Len1</var> and <var>Len2</var> arguments contain 
the length (or number of characters) for the pointers. If a length value is 
omitted, it implies the corresponding file name argument is empty.
</p>
<p>
<var>ResolveLinks</var> indicates whether file system or symbolic links are 
resolved before comparing the file name arguments. When set to <b>True</b>, 
the ComparePhysicalFilenames routine is called to resolve the file system 
links to actual path and file names for the comparison. For platforms where 
<b>NotLiteralFilenames</b> is defined, the file names are copied to a 
temporary string before resolving the file names.
</p>
<p>
Otherwise, the CompareFileNames routine (in <file>LazFileUtils</file>) is 
used to compare the file names and to get the return value.
</p>
<p>
The return value is <b>0</b> (zero) when the file names contain (or resolve 
to) the same files on the local file system. It is set to the difference 
between the lengths in Len1 and Len2 when one of the arguments has been 
omitted. For platforms where NotLiteralFilenames is not defined, it contains 
the initial difference between the ordinal values in the file names. 
Otherwise, it is set to the value from CompareFilenames (in 
<file>LazFileUtils</file>) or ComparePhysicalFilenames.
</p>
</descr>
<seealso>
<link id="ComparePhysicalFilenames"/>
<link id="#lazutils.lazfileutils.CompareFilenames">CompareFilenames</link>
</seealso>
</element>
<element name="CompareFilenames.Result">
<short>
Returns zero (<b>0</b>) if files are equal, or when character values or file 
name lengths are not equal.
</short>
</element>
<element name="CompareFilenames.Filename1">
<short>
First filename.
</short>
</element>
<element name="CompareFilenames.Len1">
<short>
Length of first filename.
</short>
</element>
<element name="CompareFilenames.Filename2">
<short>
Second filename.
</short>
</element>
<element name="CompareFilenames.Len2">
<short>
Length of second filename.
</short>
</element>
<element name="CompareFilenames.ResolveLinks">
<short>
When <b>True</b>, file system links are searched to find the actual file(s) 
for the comparison.
</short>
</element>

<element name="ExtractShortPathNameUTF8">
<short>
Gets a short path name using the 8.3 notation from the UTF-8-encoded value.
</short>
<descr>
<p>
<var>ExtractShortPathNameUTF8</var> is a <var>String</var> function used to 
get a short path name from the UTF-8-encoded value in FileName. Short path 
names use the familiar 8.3 notation, where the file name contains a maximum 
of 8 characters, and the optional file extension has a maximum of 3 
characters.
</p>
<p>
ExtractShortPathNameUTF8 is similar to the <var>ExtractShortPathName</var> 
routine in the RTL <file>sysutils</file> unit, but accepts a String value in 
<var>FileName</var> and returns a String value in the result which uses UTF-8 
encoding.The RTL routine uses UnicodeString for both.
</p>
<p>
The WinCE platform does not support the concept of short file names; the 
return value is set to the value in FileName.
</p>
<p>
For Windows platforms after version 5, the <var>GetShortPathNameW</var> 
routine is called to get the shortened path name.The UTF-16 value is 
converted to UTF-8 for use in the return value.
</p>
<p>
For all other platforms, FileName is converted to the system encoding and the 
ExtractShortPathName routine in the RTL is used to shorten the path name. The 
value is converted to UTF-8 for use in the return value.
</p>
</descr>
<seealso>
<link id="#rtl.sysutils.ExtractShortPathName">ExtractShortPathName</link>
</seealso>
</element>
<element name="ExtractShortPathNameUTF8.FileName">
<short>
Path name examined in the routine.
</short>
</element>
<element name="ExtractShortPathNameUTF8.Result">
<short>
Path name using the familiar 8.3 notation.
</short>
</element>

<element name="DeleteDirectory">
<short>
Deletes the specified directory (or only its contents when 
<var>OnlyChildren</var> is <b>True</b>).
</short>
<descr>
<p>
Returns <b>True</b> when the specified entries are deleted on the local file 
system. Returns <b>False</b> when:
</p>
<ul>
<li>
DirectoryName is one of the relative path indicators like '.' or '..'
</li>
<li>DirectoryName is an empty string ('')</li>
<li>DirectoryName does not exist on the local file system</li>
<li>
The process does not have permissions needed to delete the directory or its 
content
</li>
</ul>
</descr>
</element>
<element name="DeleteDirectory.Result">
<short>
Returns <b>True</b> if the directory or its contents were correctly removed.
</short>
</element>
<element name="DeleteDirectory.DirectoryName">
<short>
The name of the directory for processing.
</short>
</element>
<element name="DeleteDirectory.OnlyChildren">
<short>
If <b>True</b>, only the contents ('children') of the directory are removed.
</short>
</element>

<element name="ProgramDirectory">
<short>
Gets the directory where the current program is located.
</short>
<descr>
<p>
<var>ProgramDirectory</var> is a <var>String</var> function which gets the 
path to the directory where the current program is located.
</p>
<p>
ProgramDirectory calls <var>ParamStrUTF8</var> to get the command line and 
arguments used to start the current process. If the initial argument (the 
executable name) does not include a path to the file, the <b>PATH</b> 
environment variable was used to locate and start the process. 
<var>SearchFileInPath</var> is called to search each of the directory paths 
included in the PATH environment variable.
</p>
<p>
ProgramDirectory calls <var>GetPhysicalFilename</var> to resolve a symbolic 
link in the path to the executable. <var>ExpandFileNameUTF8</var> is called 
to expand drive letters or relative path references in the return value.
</p>
<p>
The return value is an empty string if the executable was not located on 
local file system.
</p>
</descr>
<seealso>
<link id="SearchFileInPath"/>
<link id="#lazutils.lazutf8.ParamStrUTF8">ParamStrUTF8</link>
<link id="#lazutils.lazutf8.GetEnvironmentVariableUTF8">GetEnvironmentVariableUTF8</link>
<link id="#lazutils.lazfileutils.GetPhysicalFilename">GetPhysicalFilename</link>
<link id="#lazutils.lazfileutils.ExpandFileNameUTF8">ExpandFileNameUTF8</link>
</seealso>
</element>
<element name="ProgramDirectory.Result">
<short>
Path to the directory where the current program is located.
</short>
</element>

<element name="ProgramDirectoryWithBundle">
<short>
Gets the directory for the current executable without the macOS bundle 
post-fix.
</short>
<descr>
<p>
<var>ProgramDirectoryWithBundle</var> is a <var>String</var> function used to 
get the path to current executable on the macOS operating system. It calls 
ProgramDirectory to get the return value, and removes the bundle post-fix 
('.app/Contents/MacOS') from the return value. The return value is not 
changed if it does not contain the bundle post-fix.
</p>
</descr>
<seealso>
<link id="ProgramDirectory"/>
</seealso>
</element>
<element name="ProgramDirectoryWithBundle.Result">
<short>
Path to the executable without the macOS bundle post-fix.
</short>
</element>

<element name="ExpandUNCFileNameUTF8">
<short>
Expands the specified UTF-8-encoded UNC file name to an absolute UNC file 
name.
</short>
<descr>
<p>
<var>ExpandUNCFileNameUTF8</var> is a <var>String</var> function used to 
expand the UNC file name in the <var>FileName</var> argument to an absolute 
UNC file name. It is the UTF-8-enabled equivalent of the ExpandUNCFileName 
routine from the FPC RTL.
</p>
<p>
ExpandUNCFileNameUTF8 calls the ExpandUNCFileName routine in RTL to get the 
return value for the method. Drive letters which are mapped to shared disks 
are replaced with the UNC device name for the mapped drive. The return value 
is an empty string ('') if an error occurs in ExpandUNCFileName.
</p>
</descr>
<seealso>
<link id="#rtl.sysutils.ExpandUNCFileName">ExpandUNCFileName</link>
<link id="#rtl.sysutils.ExpandFileName">ExpandFileName</link>
</seealso>
</element>
<element name="ExpandUNCFileNameUTF8.FileName">
<short>
File name expanded in the routine.
</short>
</element>
<element name="ExpandUNCFileNameUTF8.Result">
<short>
The expanded file name.
</short>
</element>

<element name="FileSize">
<short>
Gets the size for the specified file name.
</short>
<descr>
<p>
<var>FileSize</var> is an overloaded <var>Int64</var> function used to get 
the size for the file specified in the <var>FileName</var> parameter. 
FileSize is similar to the FileSize routine in the FPC RTL, but accepts a 
file name instead of a FileRec argument.
</p>
<p>
FileSize calls <var>FileSizeUtf8</var> to get the return value for the 
function.
</p>
</descr>
<seealso>
<link id="#lazutils.lazfileutils.FileSizeUtf8">FileSizeUtf8</link>
<link id="#rtl.system.FileSize">FileSize</link>
</seealso>
</element>
<element name="FileSize.Result">
<short>
Returns the size of the file, or -1 if the file does not exist.
</short>
</element>
<element name="FileSize.Filename">
<short>
The name of the file examined in the routine.
</short>
</element>

<element name="FilenameHasPascalExt">
<short>
Indicates whether the specified file name uses a recognized Pascal file 
extension.
</short>
<descr>
<p>
<var>FilenameHasPascalExt</var> is a <var>Boolean</var> function used to 
determine if the file name in the <var>Filename</var> argument uses a file 
extension recognized as a Pascal source code file. The <var>CompareText</var> 
routine is called to perform a case-insensitive comparison between the value 
in Filename and the recognized file extensions.
</p>
<p>
The return value is <b>True</b> when Filename has one of the following file 
extensions:
</p>
<ul>
<li>.pas</li>
<li>.pp</li>
<li>.p</li>
</ul>
<p>
The return value is <b>False</b> if Filename does not have a file extension, 
or the extension does not match the preceding values.
</p>
</descr>
<seealso/>
</element>
<element name="FilenameHasPascalExt.Result">
<short>
<b>True</b> when the file name uses a recognized Pascal file extension.
</short>
</element>
<element name="FilenameHasPascalExt.Filename">
<short>
File name examined in the routine.
</short>
</element>

<element name="FileIsInPath">
<short>
Checks whether the specified file name shares the path specified in Path.
</short>
<descr>
<p>
<var>FileIsInPath</var> is a Boolean function used to determine whether the 
file in <var>FileName</var> is located in the specified <var>Path</var>. 
FileIsInPath calls the CleanAndExpandFilename and CleanAndExpandDirectory 
routines to resolve drive letters or relative path information included in 
the arguments.
</p>
<p>
The return value is <b>True</b> when the resolved paths for the arguments 
contain the same values. FileIsInPath does <b>not</b> verify whether Path or 
FileName actually exist on the local file system. It compares the specified 
string values only.
</p>
<p>
Use DirectoryExists or DirectoryExistsUTF8 to determine whether a path exists 
on the local file system.
</p>
<p>
Use FileExists or FileExistsUTF8 to determine whether a file exists on the 
local file system.
</p>
<p>
<b>Example:</b>
</p>
<code>
// uses FileUtil;
// ...
// var
//   sDir, sFile: String;
//   bResult: Boolean;
// ...
// neither the file nor the directory exist on the file system
sDir := 'q:\bogus\path\';
sFile := 'q:\bogus\path\..\path\filename.ext';
bResult := FileIsInPath(sFile, sDir);

ShowMessage('File: ' + sFile + LineEnding +
  'is in Path: ' + sDir + '?' + LineEnding +
  'FileIsInPath() result is: ' + bResult.ToString(TUseBoolStrs.True) + '.');
</code>
</descr>
<seealso>
<link id="FileIsInDirectory"/>
<link id="#lazutils.lazfileutils.CleanAndExpandFilename">CleanAndExpandFilename</link>
<link id="#lazutils.lazfileutils.CleanAndExpandDirectory">CleanAndExpandDirectory</link>
<link id="#lazutils.lazfileutils.CompareFileNames">CompareFileNames</link>
</seealso>
</element>
<element name="FileIsInPath.Result">
<short>
Returns <b>True</b> the arguments share the same path information.
</short>
</element>
<element name="FileIsInPath.Filename">
<short>
The name of the file examined in the routine.
</short>
</element>
<element name="FileIsInPath.Path">
<short>
The path name examined in the routine.
</short>
</element>

<element name="FileIsInDirectory">
<short>
Checks whether the specified file name shares the path specified in Directory.
</short>
<descr>
<p>
<var>FileIsInDirectory</var> is a Boolean function used to determine whether 
the file in <var>FileName</var> is located in <var>Directory</var>. 
FileIsInDirectory calls the CleanAndExpandFilename and 
CleanAndExpandDirectory routines to resolve drive letters or relative path 
information included in the arguments.
</p>
<p>
The return value is <b>True</b> when the resolved paths for the arguments 
contain the same values. FileIsInDirectory does <b>not</b> verify whether 
Directory or FileName actually exist on the local file system. It compares 
the specified string values only.
</p>
<p>
Use DirectoryExists or DirectoryExistsUTF8 to determine whether a path exists 
on the local file system.
</p>
<p>
Use FileExists or FileExistsUTF8 to determine whether a file exists on the 
local file system.
</p>
<p>
<b>Example:</b>
</p>
<code>
// uses FileUtil;
// ...
// var
//   sDir, sFile: String;
//   bResult: Boolean;
// ...
// neither the file nor the directory exist on the file system
sDir := 'q:\bogus\path\';
sFile := 'q:\bogus\path\..\path\filename.ext';
bResult := FileIsInDirectory(sFile, sDir);

ShowMessage('File: ' + sFile + LineEnding +
  'is in Directory: ' + sDir + '?' + LineEnding +
  'FileIsInDirectory() result is: ' + bResult.ToString(TUseBoolStrs.True) + '.');
</code>
</descr>
<seealso>
<link id="FileIsInPath"/>
<link id="#lazutils.lazfileutils.CleanAndExpandFilename">CleanAndExpandFilename</link>
<link id="#lazutils.lazfileutils.CleanAndExpandDirectory">CleanAndExpandDirectory</link>
<link id="#lazutils.lazfileutils.CompareFileNames">CompareFileNames</link>
</seealso>
</element>
<element name="FileIsInDirectory.Result">
<short>
Returns <b>True</b> if the file and directory share the same paths.
</short>
</element>
<element name="FileIsInDirectory.Filename">
<short>
The name of the file to be checked.
</short>
</element>
<element name="FileIsInDirectory.Directory">
<short>
The name of the directory compared to the file name.
</short>
</element>

<element name="GetAllFilesMask">
<short>
Gets the file mask representing all files in a file filter.
</short>
<descr>
<p>
GetAllFilesMask returns a File Mask suitable for showing in a filter for a 
Open File Dialog. For Windows, '*.*' is returned; on other operating systems 
'*' is used.
</p>
</descr>
<seealso/>
</element>
<element name="GetAllFilesMask.Result">
<short>
The All Files mask for the platform.
</short>
</element>

<element name="GetExeExt">
<short>
Returns the file extension (including the starting .) for an executable file 
on the platform.
</short>
</element>
<element name="GetExeExt.Result">
<short>
Returns '.exe' on Windows, or an empty string for other platforms.
</short>
</element>

<element name="ReadFileToString">
<short>
Returns a string with the contents of the named text file.
</short>
<descr>
<p>
<var>ReadFileToString</var> opens the file specified in the <var>FileName</var> 
argument, then reads its contents into the <var>Result</var> string.
</p>
<p>
<var>FileName</var> can include a path to the file, but cannot include a value 
which needs to be resolved (like '~' for the home directory on UNIX-like file 
systems). Relative path notation can be used in FileName.
</p>
<p>
ReadFileToString does not check whether FileName contains an expanded value or 
whether it exists on the local file system. It does not complain if the file 
does not exist or cannot be accessed; the return value is an empty string ('') 
for these conditions. ExpandFileName() or ExpandFileNameUTF8() can be used to 
resolve a path with '~' notation. FileExists() or FileExistsUTF8() can be used 
to verify whether the file path/name exists before ReadFileToString is called.
</p>
<p>
FileSize is used to determine the storage size needed for the return value. 
UNIX-like file systems usually return 0 as the file size if FileName is located 
on a virtual file system (like /proc). In this case, the return value is an 
empty string. Another mechanism (like TStringList.LoadfromFile) should be used 
for virtual files.
</p>
<p>
FileOpenUTF8 is called to get a shared handle used to read from (but not write 
to) the specified file name. If an invalid handle is returned, the routine 
quietly exits with an empty return value.
</p>
<p>
FileRead is called for the handle to read the number of bytes in the file size 
into the return value.
</p>
<p>
FileClose is called to close the handle for the file when the operation has 
been completed.
</p>
</descr>
<errors>
If an error occurs while reading from or closing the file handle, the Exception 
is handled in the routine and an empty string is returned.
</errors>
<seealso>
<link id="FileSize"/>
<link id="#lazutils.lazfileutils.FileOpenUTF8">FileOpenUTF8</link>
<link id="#lazutils.lazfileutils.FileExistsUTF8">FileExistsUTF8</link>
<link id="#lazutils.lazfileutils.ExpandFileNameUTF8">ExpandFileNameUTF8</link>
<link id="#rtl.sysutils.FileRead">FileRead</link>
<link id="#rtl.sysutils.FileClose">FileClose</link>
<link id="#rtl.sysutils.FileExists">FileExists</link>
<link id="#rtl.sysutils.feInvalidHandle">feInvalidHandle</link>
</seealso>
</element>
<element name="ReadFileToString.Result">
<short>
The contents of the file as a string. Returns an empty string if there is an 
error, the file does not exist, or the file is empty.
</short>
</element>
<element name="ReadFileToString.Filename">
<short>
The qualified name for the file read in the routine.
</short>
</element>

<element name="TSearchFileInPathFlag">
<short>
Flags used to control options used when searching for file(s) in a given path.
</short>
<descr>
<p>
<var>TSearchFileInPathFlag</var> is an enumerated type with values that 
enable search options when locating files in a given path. Values in 
TSearchFileInPathFlag are stored in the <var>TSearchFileInPathFlags</var> set 
type and passed as an argument to the <var>SearchFileInPath</var> and 
<var>SearchAllFilesInPath</var> routines.
</p>
</descr>
<seealso>
<link id="TSearchFileInPathFlags"/>
<link id="SearchFileInPath"/>
<link id="SearchAllFilesInPath"/>
</seealso>
</element>
<element name="TSearchFileInPathFlag.sffDontSearchInBasePath">
<short>
Do not search in BasePath, search only in SearchPath.
</short>
</element>
<element name="TSearchFileInPathFlag.sffSearchLoUpCase">
<short>
Performs a case-insensitive search for file or directory names.
</short>
</element>
<element name="TSearchFileInPathFlag.sffFile">
<short>
Must be a file, and not a directory.
</short>
</element>
<element name="TSearchFileInPathFlag.sffExecutable">
<short>
File must be an executable file for the platform.
</short>
</element>
<element name="TSearchFileInPathFlag.sffDequoteSearchPath">
<short>
Removes ANSI Quotation Marks in a search path or file name.
</short>
</element>

<element name="TSearchFileInPathFlags">
<short>
Set type used to store values from the TSearchFileInPathFlag enumeration.
</short>
<descr>
<p>
<var>TSearchFileInPathFlags</var> is a <b>Set</b> type used to store zero (0) 
or more values from the <var>TSearchFileInPathFlag</var> enumeration. It is 
the type passed as an argument to the <var>SearchFileInPath</var> and 
<var>SearchAllFilesInPath</var> routines.
</p>
</descr>
<seealso>
<link id="TSearchFileInPathFlag"/>
<link id="SearchFileInPath"/>
<link id="SearchAllFilesInPath"/>
</seealso>
</element>

<element name="sffFindProgramInPath">
<short>
Search flags used to find a program file in a path on the current platform.
</short>
<descr>
<p>
<var>sffFindProgramInPath</var> is a constant which contains the default 
<var>TSearchFileInPathFlag</var> enumeration values used to locate a program 
file on the current platform.
</p>
<p>
For the Windows platform, sffFindProgramInPath contains the following values:
</p>
<code>[ sffDequoteSearchPath, sffFile, sffExecutable ]</code>
<p>
For UNIX-like platforms, sffFindProgramInPath contains the following values:
</p>
<code>[ sffDontSearchInBasePath, sffFile, sffExecutable ]</code>
<p>
For all other platforms, sffFindProgramInPath contains the following values:
</p>
<code>[ sffFile, sffExecutable ]</code>
<p>
sffFindProgramInPath is used in the implementation of the 
<var>FindDefaultExecutablePath</var> routine.
</p>
</descr>
<seealso>
<link id="FindDefaultExecutablePath"/>
</seealso>
</element>

<element name="SearchFileInPath">
<short>
Searches for a file name in a given path using the specified base path and 
options.
</short>
<descr>
<p>
<var>SearchFileInPath</var> is a <var>String</var> function used to get the 
fully-qualified name for the specified <var>FileName</var> in the specified 
search paths. When FileName contains an absolute path, and the file exists in 
the file system, no other directories are checked in the routine.
</p>
<p>
<var>SearchPath</var> contains the delimited list of search paths examined in 
the routine. Search paths are separated using the value in 
<var>Delimiter</var>.
</p>
<p>
<var>BasePath</var> contains the path used to resolve relative path 
references in SearchPath. By default, BasePath is also searched unless 
<var>sffDontSearchInBasePath</var> is included in the <var>Flags</var> 
parameter.
</p>
<p>
<var>Flags</var> contains values from the <var>TSearchFileInPathFlag</var> 
enumeration used to control the file matching logic used in the routine. For 
example:
</p>
<dl>
<dt>sffDontSearchInBasePath</dt>
<dd>Prevents searching in the directory represented by BasePath.</dd>
<dt>sffFile</dt>
<dd>Excludes a directory entry that matches the file name.</dd>
<dt>sffExecutable</dt>
<dd>Exclude any file or directory name that is not an executable.</dd>
</dl>
<p>
By default, the current directory is searched first. Each of the paths in 
SearchPaths are also searched until a file with the specified FileName is 
found.
</p>
<p>
The return value contains the fully-qualified path to the file including the 
file name and extension (when used). The first file that matches the supplied 
criteria is used in the return value. It may contain an empty string when a 
file with the given file name was not located.
</p>
</descr>
</element>
<element name="SearchFileInPath.Result">
<short>
Fully qualified file name for the file, or an empty string if the file was 
not found.
</short>
</element>
<element name="SearchFileInPath.Filename">
<short>
The name of the file to locate in the routine.
</short>
</element>
<element name="SearchFileInPath.BasePath">
<short>
Path used to resolve relative path references in a search path.
</short>
</element>
<element name="SearchFileInPath.SearchPath">
<short>
List of search paths examined in the routine.
</short>
</element>
<element name="SearchFileInPath.Delimiter">
<short>
Delimiter used to separate search paths.
</short>
</element>
<element name="SearchFileInPath.Flags">
<short>
Controls the file matching logic and behavior used in the routine.
</short>
</element>

<element name="SearchAllFilesInPath">
<short>
<var>SearchAllFilesInPath</var> - searches for all files named 
<var>Filename</var> in the given <var>SearchPath</var> using the supplied 
<var>BasePath</var> with the specified <var>Delimiter</var> and the options 
listed in <var>Flags</var>.
</short>
<descr>
<p>
<var>SearchAllFilesInPath</var> is a TStrings function used to get a list 
with all file names matching the value in <var>FileName</var>.
</p>
<p>
SearchAllFilesInPath creates the TStringList instance in the return value 
when needed. The return value can be <b>Nil</b> if no files or directories 
were found that match the FileName parameter.
</p>
<p>
Files or directories stored in the return value are fully-qualified path 
names, with relative path references resolved to the path in 
<var>BasePath</var>. If FileName contains an absolute path name, the return 
value has a single entry with the normalized value for FileName.
</p>
<p>
<var>SearchPath</var> contains one or more search paths examined in the 
routine. Each search path is separated by the value in <var>Delimiter</var>.
</p>
<p>
<var>Flags</var> is a set type which contains zero or more options enabled 
for the search. It can include values from the 
<var>TSearchFileInPathFlag</var> enumeration, including:
</p>
<dl>
<dt>sffDontSearchInBasePath</dt>
<dd>
Omits the directory in BasePath from the search process. Uses only the 
directories in SearchPath. When not used, matching files in BasePath are 
included in the search results.
</dd>
<dt>sffFile</dt>
<dd>
Matching entries must be a file and not a directory. Directory names which 
match FileName are ignored.
</dd>
<dt>sffExecutable</dt>
<dd>
Matching entries must be an executable file for the platform. Non-executable 
files are ignored.
</dd>
<dt>sffDequoteSearchPath</dt>
<dd>
Removes ANSI Quotation Marks found in the sanitized name for a matching file.
</dd>
</dl>
</descr>
<seealso>
<link id="TSearchFileInPathFlag"/>
<link id="TSearchFileInPathFlags"/>
<link id="#lazutils.lazfileutils.FilenameIsAbsolute">FilenameIsAbsolute</link>
<link id="#lazutils.lazfileutils.CleanAndExpandFilename">CleanAndExpandFilename</link>
<link id="#lazutils.lazfileutils.CleanAndExpandDirectory">CleanAndExpandDirectory</link>
<link id="#lazutils.lazfileutils.FileExistsUTF8">FileExistsUTF8</link>
<link id="#lazutils.lazfileutils.DirectoryExistsUTF8">DirectoryExistsUTF8</link>
</seealso>
</element>
<element name="SearchAllFilesInPath.Result">
<short>
Returns a fully qualified file name for all files that match the supplied 
criteria, or an empty string if the file is not found.
</short>
</element>
<element name="SearchAllFilesInPath.Filename">
<short>
The name of the file for searching.
</short>
</element>
<element name="SearchAllFilesInPath.BasePath">
<short>
The <var>BasePath</var> to be used for the search.
</short>
</element>
<element name="SearchAllFilesInPath.SearchPath">
<short>
The path for searching.
</short>
</element>
<element name="SearchAllFilesInPath.Delimiter">
<short>
The delimiter used between search paths.
</short>
</element>
<element name="SearchAllFilesInPath.Flags">
<short>
<var>Flags</var> specifying how to search: e.g. don't search in base path, 
case independent search.
</short>
</element>

<element name="FindDiskFilename">
<short>
Finds the file name that most closely matches the specified file name.
</short>
<descr>
<p>
<var>FindDiskFilename</var> is a String function used to get the file name 
which most closely matches the value in the <var>FileName</var> argument. It 
does not use case-sensitivity when comparing file names - regardless of the 
platform. In addition, the file must exist on the local file system.
</p>
<p>
FileName can include a fully-qualified path including a drive letter on 
Windows platforms. A drive letter in the value is always converted to 
uppercase. The path to the file is extracted and sanitized to resolve 
relative path references.
</p>
<p>
The file path is used to locate and compare all files in the directory by 
calling FindFirstUTF8 and FindNextUTF8. Each file entry is examined using 
CompareFilenamesIgnoreCase for a case-insensitive match for the specified 
file name. When a single match is found, its fully qualified path and file 
name are assigned as the return value. If more than one file is a match, the 
result is ambiguous and the resolved value for the original FileName argument 
is returned.
</p>
<remark>
The "All Files" mask for the platform is used to find the files in the path. 
This can be time consuming when a folder has a large number of files.
</remark>
<p>
<b>Example:</b>
</p>
<code>
// uses FileUtil;
// var AFileName, AResult: String;
// ...

// Windows
AFileName := 'c:\WINDOWS\WIN.INI';
AResult := FindDiskFileName(AFileName);
// AResult contains: 'C:\Windows\win.ini';

// UNIX-like platforms
AFileName := '/ETC/FONTS/FONTS.CONF';
AResult := FindDiskFileName(AFileName);
// AResult contains: '/etc/fonts/fonts.conf';
</code>
</descr>
<seealso>
<link id="FindFirstUTF8"/>
<link id="FindNextUTF8"/>
<link id="GetAllFilesMask"/>
<link id="#lazutils.lazfileutils.ResolveDots">ResolveDots</link>
<link id="#lazutils.lazfileutils.CompareFilenamesIgnoreCase">CompareFilenamesIgnoreCase</link>
</seealso>
</element>
<element name="FindDiskFilename.Result">
<short>
Resolved path and file name which is the case-insensitive match for the 
specified value.
</short>
</element>
<element name="FindDiskFilename.Filename">
<short>
The qualified path (optional) and file name to locate in the routine.
</short>
</element>

<element name="FindDiskFileCaseInsensitive">
<short>
<var>FindDiskFileCaseInsensitive</var> - searches for the given 
<var>FileName</var> in a case insensitive manner.
</short>
</element>
<element name="FindDiskFileCaseInsensitive.Result">
<short>
If it exists, returns the file name with path information otherwise returns 
an empty string.
</short>
</element>
<element name="FindDiskFileCaseInsensitive.Filename">
<short>
The name of the file for processing.
</short>
</element>

<element name="FindDefaultExecutablePath">
<short>
Finds the default path to the named Executable file.
</short>
<descr>
<p>
<var>FindDefaultExecutablePath</var> finds the default path to the named 
Executable file. On Windows systems, it looks for files both with and without 
the '.EXE' extension.
</p>
<p>
If Executable is not an absolute filename the executable is searched using 
the environment variable PATH. Relative directories in PATH are expanded 
using BaseDir.
</p>
<p>
On non-Unix systems (e.g. Windows), it searches in BaseDir as well. While on 
Unix systems (e.g. Linux, OS X) it only searches in BaseDir, if PATH contains 
the '.' directory.
</p>
</descr>
</element>
<element name="FindDefaultExecutablePath.Result">
<short>
Returns the filename of the Executable file with path information attached.
</short>
</element>
<element name="FindDefaultExecutablePath.Executable">
<short>
The name of the <var>Executable</var> file.
</short>
</element>

<element name="TFileIterator">
<short>
Implements an iterator for file and directory names on the local file system.
</short>
<descr>
<p>
<var>TFileIterator</var> is a class used to implement an iterator for file 
and directory names on the local file system. TFileIterator provides 
properties and methods used to represent the path and file name for values 
found when searching the local file system. It is not very useful on its own, 
but serves as the base class for the <var>TFileSearcher</var> ancestor.
</p>
<p>
TFileIterator is the type passed as an argument to 
<var>TFileFoundEvent</var>, <var>TDirectoryFoundEvent</var>, and 
<var>TDirectoryEnterEvent</var> event handlers.
</p>
</descr>
<seealso>
<link id="TFileSearcher"/>
<link id="TFileFoundEvent"/>
<link id="TDirectoryFoundEvent"/>
<link id="TDirectoryEnterEvent"/>
</seealso>
</element>

<element name="TFileIterator.FPath"/>
<element name="TFileIterator.FLevel"/>
<element name="TFileIterator.FFileInfo"/>
<element name="TFileIterator.FSearching"/>

<element name="TFileIterator.GetFileName">
<short>
Gets the value for the FileName property.
</short>
<descr/>
<seealso>
<link id="TFileIterator.FileName"/>
</seealso>
</element>
<element name="TFileIterator.GetFileName.Result">
<short>
Value for the property.
</short>
</element>

<element name="TFileIterator.Stop">
<short>
Stops the search process.
</short>
<descr>
<p>
Changes the value in <var>Searching</var> to <b>False</b>.
</p>
</descr>
<seealso>
<link id="TFileIterator.Searching"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TFileIterator.IsDirectory">
<short><b>True</b> when the current file system entry is a directory.</short>
<descr>
<p>
<var>IsDirectory</var> is a <var>Boolean</var> function which indicates if 
the current file entry is a directory on the local file system. Checks the 
file attributes in <var>FileInfo</var> to determine if the 
<var>faDirectory</var> attribute is included for the file. Returns 
<b>True</b> when the attribute in included in the <var>TSearchRec</var> value.
</p>
</descr>
<seealso>
<link id="TFileIterator.FileInfo"/>
<link id="#rtl.sysutils.TSearchRec">TSearchRec</link>
<link id="#rtl.sysutils.faDirectory">faDirectory</link>
</seealso>
</element>
<element name="TFileIterator.IsDirectory.Result">
<short>
<b>True</b> if the current file entry is a directory.
</short>
</element>

<element name="TFileIterator.FileName">
<short>
The qualified file name for the current file entry.
</short>
<descr>
<p>
<var>FileName</var> is a read-only <var>String</var> property which contains 
the qualified file name for the current file entry. FileName includes the 
value in <var>Path</var> as a prefix and the file name indicated in 
<var>FileInfo</var>.
</p>
</descr>
<seealso>
<link id="TFileIterator.Path"/>
<link id="TFileIterator.FileInfo"/>
</seealso>
</element>

<element name="TFileIterator.FileInfo">
<short>
Contains file information for the current entry in the iterator.
</short>
<descr>
<p>
<var>FileInfo</var> is a read-only <var>TSearchRec</var> property with the 
file information for the current entry in the iterator. FileInfo is used in 
the IsDirectory method to determine the faDirectory file attribute exists in 
the file information. Values in the <var>Path</var>, <var>FileName</var>, and 
FileInfo properties are updated in descendent classes which perform the 
search operation.
</p>
</descr>
<seealso>
<link id="TFileIterator.IsDirectory"/>
<link id="TFileIterator.FileName"/>
<link id="TFileIterator.Path"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TFileIterator.Level">
<short>
Gets the current directory level relative to the base search path.
</short>
<descr>
<p>
<var>Level</var> is a read-only <var>Integer</var> property which contains 
the directory level for the current entry in the <var>FileInfo</var> 
property. The level indicates the number of sub-directories relative to the 
the base search path. The value in Level is maintained in descendent classes 
that perform a search operation using the iterator.
</p>
</descr>
<seealso>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.IsDirectory"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TFileIterator.Path">
<short>
Contains the path to the current file or directory in the iterator.
</short>
<descr>
<p>
<var>Path</var> is a read-only <var>String</var> property which contains the 
fully-qualified path to the current file or directory in the 
<var>FileInfo</var> property. Values in the Path, <var>FileName</var>, and 
FileInfo properties are updated in descendent classes which perform the 
search operation.
</p>
</descr>
<seealso>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.FileName"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TFileIterator.Searching">
<short>
Indicates if a search process is active.
</short>
<descr>
<p>
<var>Searching</var> is a read-only <var>Boolean</var> property which 
indicates if a search process is active for the iterator. The property value 
is updated in descendent classes which perform the search operation.
</p>
<p>
Searching is set to <b>False</b> when the <var>Stop</var> method is called.
</p>
</descr>
<seealso>
<link id="TFileIterator.Stop"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TFileFoundEvent">
<short>
Specifies an event handler signalled when a file name is found for the 
specified iterator.
</short>
<descr>
<p>
<var>TFileFoundEvent</var> is an object procedure type which specifies an 
event handler signalled when a file name is found using the specified 
iterator. <var>FileIterator</var> contains the <var>TFileIterator</var> 
instance for the event notification.
</p>
<p>
TFileFoundEvent is the type used to implement the 
<var>TFileSearcher.OnFileFound</var> event handler. Applications can 
implement a procedure using the event signature to perform actions needed to 
process the file in a FileIterator.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.OnFileFound"/>
</seealso>
</element>
<element name="TFileFoundEvent.FileIterator">
<short>
File iterator with the file information for the event.
</short>
</element>

<element name="TDirectoryFoundEvent">
<short>
Specifies an event handler signalled when a directory is found for the 
specified iterator.
</short>
<descr>
<p>
<var>TDirectoryFoundEvent</var> is an object procedure type which specifies 
an event handler signalled when a directory is located for the iterator in 
<var>FileIterator</var>.
</p>
<p>
TDirectoryFoundEvent is the type used to implement the 
<var>TFileSearcher.OnDirectoryFound</var> event handler. Applications can 
implement a procedure using the event signature to perform actions needed to 
process the directory in a FileIterator.
</p>
</descr>
<seealso/>
</element>
<element name="TDirectoryFoundEvent.FileIterator">
<short>
File iterator with the directory information for the event.
</short>
</element>

<element name="TDirectoryEnterEvent">
<short>
Specifies an event handler signalled when a new directory is processed with 
the specified iterator.
</short>
<descr>
<p>
<var>TDirectoryEnterEvent</var> is an object procedure type which specifies 
an event handler signalled when a new directory is processed for the iterator 
in <var>FileIterator</var>.
</p>
<p>
TDirectoryEnterEvent is the type used to implement the 
<var>TFileSearcher.OnDirectoryEnter</var> event handler. Applications can 
implement a procedure using the event signature to perform actions needed to 
process the directory in a FileIterator.
</p>
</descr>
<seealso/>
</element>
<element name="TDirectoryEnterEvent.FileIterator">
<short>
File iterator with the directory information for the event.
</short>
</element>

<element name="TQueryFileFoundEvent">
<short>
Specifies an event handler signalled when a file name matching a search 
criteria is found in TFileSearcher.
</short>
<descr>
<p>
<var>TQueryFileFoundEvent</var> is the type used to implement the 
OnQueryFileFound event handler in TFileSearcher. It allows a a file name to be 
examined to determine whether it can be accepted in the file iterator. An 
application must implement a handler routine using the signature in 
TQueryFileFoundEvent to respond to the notification event.
</p>
<p>
Set the Accept argument to <b>True</b> if the file name in <b>Fn</b> can be 
used by the file iterator.
</p>
</descr>
<seealso>
<link id="TFileSearcher.OnQueryFileFound"/>
<link id="TFileIterator"/>
</seealso>
</element>
<element name="TQueryFileFoundEvent.FileIterator">
<short>
Iterator class instance (TFileIterator) for the notification.  
</short>
</element>
<element name="TQueryFileFoundEvent.Fn">
<short>
File name for the notification.
</short>
</element>
<element name="TQueryFileFoundEvent.Accept">
<short>
<b>True</b> to accept the file name. <b>False</b> to reject it.
</short>
</element>

<element name="TQueryDirectoryFoundEvent">
<short>
Specifies an event handler signalled when a directory name matching a search 
criteria is found in TFileSearcher.
</short>
<descr>
<p>
TQueryDirectoryFoundEvent is the type used to implement the OnQueryFileFound 
event handler in TFileSearcher. It allows a a directory name to be 
examined to determine whether it can be accepted in the iterator. An 
application must implement a handler routine using the signature in
TQueryDirectoryFoundEvent to respond to the notification event.
</p>
<p>
Set the Accept argument to <b>True</b> if the file name in <b>Fn</b> can be 
used by the file iterator.
</p>
</descr>
<seealso>
<link id="TFileSearcher.OnQueryDirectoryEnter"/>
<link id="TFileIterator"/>
</seealso>
</element>
<element name="TQueryDirectoryFoundEvent.FileIterator">
<short>
Iterator class instance (TFileIterator) for the notification.  
</short>
</element>
<element name="TQueryDirectoryFoundEvent.Dir">
<short>
Directory name for the notification.
</short>
</element>
<element name="TQueryDirectoryFoundEvent.Accept">
<short>
<b>True</b> to accept the directory name. <b>False</b> to reject it.  
</short>
</element>

<element name="TFileSearcher">
<short>
Implements an iterator used to search for files or directories.
</short>
<descr>
<p>
<var>TFileSearcher</var> is a <var>TFileIterator</var> descendant used to 
search for files or directories that match a search mask in a given directory 
path. TFileSearcher extends the ancestor class with additional properties, 
methods, and events needed to search and process files or directories on the 
local file system.
</p>
<p>
It implements the <var>Search</var> method to perform a search using the 
specified path(s) and file mask(s).
</p>
<p>
Use <var>MaskSeparator</var> to specify the delimiter used to separate a list 
of mask values passed to the method. Use <var>PathSeparator</var> to specify 
the delimiter used to separate a list of file paths passed to the method.
</p>
<p>
Use <var>FileAttribute</var> and <var>DirectoryAttribute</var> to specify the 
file system attributes needed for files or directories considered a match in 
the Search method. Use <var>FollowSymLink</var> to indicate whether symbolic 
links on the file system are followed in the Search method.
</p>
<p>
Use the <var>OnFileFound</var>, <var>OnDirectoryFound</var>, and 
<var>OnDirectoryEnter</var> event handlers to perform the actions needed for 
files or directories found using the Search method.
</p>
<p>
TFileSearcher is the ancestor class for more specialized descendants like 
<var>TListFileSearcher</var> and <var>TListDirectoriesSearcher</var>.
</p>
</descr>
<seealso>
<link id="TFileIterator"/>
<link id="TListFileSearcher"/>
<link id="TListDirectoriesSearcher"/>
</seealso>
</element>

<element name="TFileSearcher.FMaskSeparator"/>
<element name="TFileSearcher.FPathSeparator"/>
<element name="TFileSearcher.FFollowSymLink"/>
<element name="TFileSearcher.FOnFileFound"/>
<element name="TFileSearcher.FOnDirectoryFound"/>
<element name="TFileSearcher.FOnDirectoryEnter"/>
<element name="TFileSearcher.FFileAttribute"/>
<element name="TFileSearcher.FDirectoryAttribute"/>
<element name="TFileSearcher.FOnQueryFileFound"/>
<element name="TFileSearcher.FOnQueryDirectoryEnter"/>
<element name="TFileSearcher.FCircularLinkDetection"/>
<element name="TFileSearcher.VisitedDirs"/>

<element name="TFileSearcher.RaiseSearchingError">
<short>
Raises an Exception if Search is called when Searching is already set to 
<b>True</b>.
</short>
</element>

<element name="TFileSearcher.DoDirectoryEnter">
<short>
Signals the OnDirectoryEnter event handler (when assigned).
</short>
</element>

<element name="TFileSearcher.DoDirectoryFound">
<short>
Signals the OnDirectoryFound event handler (when assigned).
</short>
</element>

<element name="TFileSearcher.DoFileFound">
<short>
Signals the OnFileFound event handler (when assigned).
</short>
</element>

<element name="TFileSearcher.DoQueryFileFound">
<short>
Performs actions needed to accept or reject a file name processed in the 
Search method.
</short>
<descr>
<p>
<var>DoQueryFileFound</var> signals the OnQueryFileFound event handler (when 
assigned) to allow the application to decide if the <var>Fn</var> argument 
contains a file name which can be used in the class. An application must 
implement and assign a handler routine to OnQueryFileFound to respond to the 
notification.
</p>
<p>
DoQueryFileFound is called during execution of the Search method when a file 
name is found using the search path and search mask passed to the method. 
Set <var>Accept</var> to <b>True</b> if the file name can be used in the class 
to signal the OnFileFound event handler.
</p>
</descr>
<seealso/>
</element>
<element name="TFileSearcher.DoQueryFileFound.Fn">
<short>
File name passed to OnQueryFileFound event handler.
</short>
</element>
<element name="TFileSearcher.DoQueryFileFound.Accept">
<short>
Returns <b>True</b> if the specified file name can be used. Returns 
<b>False</b> if the specified file name should be omitted.
</short>
</element>

<element name="TFileSearcher.DoQueryDirectoryEnter">
<short>
Performs actions needed to accept or reject a directory name processed in the 
Search method.
</short>
<descr>
<p>
<var>DoQueryDirectoryEnter</var> signals the OnQueryDirectoryEnter event 
handler (when assigned) to allow the application to decide if the 
<var>Dir</var> argument contains a directory name which can be used in the 
class. An application must implement and assign a handler routine to 
OnQueryDirectoryEnter to respond to the notification.
</p>
<p>
OnQueryDirectoryEnter is called during execution of the Search method when a 
directory name is detected and accepted using the search path and search mask 
passed to the method. Set <var>Accept</var> to <b>True</b> if the directory 
name can be used in the class to signal the OnDirectoryEnter event handler.
</p>
</descr>
<seealso>
<link id="TFileSearcher.OnQueryDirectoryEnter"/>
<link id="TFileSearcher.OnDirectoryEnter"/>
<link id="TFileSearcher.OnQueryFileFound"/>
<link id="TFileSearcher.OnFileFound"/>
<link id="TFileSearcher.FileAttribute"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileSearcher.FollowSymLink"/>
<link id="TFileSearcher.PathSeparator"/>
<link id="TFileSearcher.MaskSeparator"/>
<link id="TFileIterator.Stop"/>
</seealso>
</element>
<element name="TFileSearcher.DoQueryDirectoryEnter.Dir">
<short>
Directory name passed to the OnQueryDirectoryFound event handler.
</short>
</element>
<element name="TFileSearcher.DoQueryDirectoryEnter.Accept">
<short>
Returns <b>True</b> if the specified directory can be used. Returns 
<b>False</b> if the specified directory should be omitted.
</short>
</element>

<element name="TFileSearcher.Create">
<short>
Constructor for the class instance.
</short>
<descr>
<p>
<var>Create</var> is the overridden constructor for the class instance, and 
calls the inherited constructor on entry. Create sets the default values used 
in the following properties:
</p>
<dl>
<dt>MaskSeparator</dt>
<dd>Set to ';'.</dd>
<dt>PathSeparator</dt>
<dd>Set to ';'.</dd>
<dt>FollowSymLink</dt>
<dd>Set to <b>True</b>.</dd>
<dt>FileAttribute</dt>
<dd>Set to faAnyFile.</dd>
<dt>DirectoryAttribute</dt>
<dd>Set to faDirectory.</dd>
<dt>Searching</dt>
<dd>Set to <b>False</b>.</dd>
</dl>
</descr>
<seealso/>
</element>

<element name="TFileSearcher.Search">
<short>
Searches for files or directories in the specified path(s) using the specified 
options.
</short>
<descr>
<p>
<var>Search</var> is a method used to search for files or directories matching 
the specified file masks found in the specified search paths.
</p>
<p>
<var>ASearchPath</var> contains one or more paths examined in the method, and 
can contain multiple path names separated by the value in 
<var>PathSeparator</var>. Each delimited path value in ASearchPath is resolved
by calling the <var>ResolveDots</var> function, and processed in the method. 
For example:
</p>
<code>
'c:\path\to\dir;c:\path\to\another\dir'
'/home/user/path/to/dir;/home/user/path/to/another/dir'
</code>
<p>
Please note that leading or trailing white space in a search path is treated as 
part of the path specification. It is not trimmed, and will most likely prevent 
a match for the path value.
</p>
<p>
<var>ASearchMask</var> contains one or more file masks which determine the 
matching files in the method. It may contain multiple file masks separated by 
the value in the <var>MaskSeparator</var> property. For example:
</p>
<code>
'*.pas;*.pp;*.lpr'
</code>
<p>
Please note that leading or trailing white space in a file mask is treated as 
part of the file specification. It is not trimmed, and will most likely prevent 
a match for the mask value.
</p>
<p>
<var>ASearchSubDirs</var> includes subdirectories found in ASearchPath in the 
search process when set to <b>True</b>. When set to <b>False</b> only the 
specified path(s) are searched and their subdirectories are ignored. The 
default value is <b>True</b> and includes subdirectories.
</p>
<p>
<var>CaseSensitive</var> determines whether file masks in ASearchMask are 
handled in a case-sensitive manner. The default value is <b>False</b>.
</p>
<p>
Use the <var>FileAttribute</var> property to control the file attributes needed 
for any file that is considered a match in the search process. The default 
value (<var>faAnyFile</var>) allows all files to be considered.
</p>
<p>
Use the <var>DirectoryAttribute</var> property to control the directory 
attributes needed for any directory that is considered a match in the search 
process. The default value (<var>faDirectory</var>) includes directories.
</p>
<p>
Use the <var>FollowSymLink</var> property to indicate whether symbolic links 
in the file system are followed in the method. When enabled, a path or file 
name that is a symbolic link is expanded (when accepted) to get the real path 
on the local file system. By default, FollowSymLink is enabled in TFileSearcher.
</p>
<p>
Search processes each of the path values found in ASearchPath. FindFirstUTF8 is 
called to get file and directory attributes examined in the process. Values in 
FileAttribute and DirectoryAttribute are checked to determine which directories 
and files are available in the method. FollowSymLink determines whether an 
internal hash of visited directories is maintained in the method and used to 
resolve symbolic links.
</p>
<p>
The OnQueryFileFound and OnQueryDirectoryFound events handlers are signalled 
(when assigned) to allow the application to include or exclude each directory 
or file found in the process. Arguments passed to these handlers include the 
fully-qualified path or file name returned by ExpandFilenameUtf8.
</p>
<p>
When a matching file is found, the OnFileFound event is signalled. When a 
matching directory is found, the OnDirectoryFound event is signalled. When a 
new directory is processed in the method, the OnDirectoryEnter event is 
signalled. 
</p>
<p>
Applications must assign a handler routine for these events to respond to the 
notifications. You can abort the search process by calling the Stop method in 
the handlers for these events.
</p>
<p>
Search is used in the implementation of routines like CopyFile, CopyDirTree, 
FindAllFiles, and FindAllDirectories.
</p>
</descr>
<errors>
<p>
An Exception is raised if Search is called while a previous call to the method 
is already running.
</p>
</errors>
<seealso>
<link id="TFileSearcher.OnFileFound"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileSearcher.OnQueryDirectoryEnter"/>
<link id="TFileSearcher.OnQueryFileFound"/>
<link id="TFileSearcher.DoQueryDirectoryEnter"/>
<link id="TFileSearcher.DoQueryFileFound"/>
<link id="TFileSearcher.FileAttribute"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileSearcher.FollowSymLink"/>
<link id="TFileSearcher.PathSeparator"/>
<link id="TFileSearcher.MaskSeparator"/>
<link id="TFileIterator.Stop"/>
<link id="CopyDirTree"/>
<link id="CopyFile"/>
<link id="FindAllFiles"/>
<link id="FindAllDirectories"/>
<link id="#lazutils.lazfileutils.ExpandFilenameUtf8">ExpandFilenameUtf8</link>
<link id="#lazutils.masks.TMaskList">TMaskList</link>
</seealso>
</element>
<element name="TFileSearcher.Search.ASearchPath">
<short>
One or more paths used to search for files.
</short>
</element>
<element name="TFileSearcher.Search.ASearchMask">
<short>
One or more masks used to determine file names that match in the search.
</short>
</element>
<element name="TFileSearcher.Search.ASearchSubDirs">
<short>
Indicates if subdirectories are searched recursively.
</short>
</element>
<element name="TFileSearcher.Search.CaseSensitive">
<short>
Indicates if file names are compared using case sensitivity.
</short>
</element>

<element name="TFileSearcher.MaskSeparator">
<short>
Character used as a delimiter between file masks.
</short>
<descr>
<p>
<var>MaskSeparator</var> is a <var>Char</var> property which contains the 
character used as a delimiter between file masks in the search criteria. The 
default value for the property is '<b>;</b>' as assigned in the 
<var>Create</var> method.
</p>
<p>
MaskSeparator is used in<var>Search</var> to fill an internal 
<var>TMaskList</var> instance used in the method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.PathSeparator"/>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.Create"/>
<link id="#lazutils.masks.TMaskList">TMaskList</link>
</seealso>
</element>

<element name="TFileSearcher.PathSeparator">
<short>
Character used as a delimiter between directory paths.
</short>
<descr>
<p>
<var>PathSeparator</var> is a <var>Char</var> property which contains the 
character used as a delimiter between directory paths in the search criteria. 
The default value for the property is '<b>;</b>' as assigned in the 
<var>Create</var> method.
</p>
<p>
PathSeparator is used in the <var>Search</var> method to fill an internal 
<var>TStringList</var> instance with the directory paths specified in the 
search criteria.
</p>
</descr>
<seealso>
<link id="TFileSearcher.MaskSeparator"/>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.Create"/>
</seealso>
</element>

<element name="TFileSearcher.FollowSymLink">
<short>
Indicates if a search process directory paths that are symbolic links.
</short>
<descr>
<p>
<var>FollowSymLink</var> is a <var>Boolean</var> property which indicates if 
the <var>Search</var> method should process directory paths that are symbolic 
links on the local file system. The default value for the property is 
<b>True</b> as assigned in the <var>Create</var> method.
</p>
<p>
FollowSymLink is used in the Search method when a directory entry is detected 
in <var>FileInfo</var> that <var>FileIsSymLink</var> identifies as a symbolic 
link. When set to <b>False</b>, the directory is <b>not</b> processed; the 
<var>OnDirectoryEnter</var> event handler is <b>not</b> signalled and the 
method ignores the directory path. The <var>OnDirectoryFound</var> event 
handler is signalled for the iterator value.
</p>
<p>
Use CircularLinkDetection to control whether symbolic links in already 
processed directories are included in the search results.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Create"/>
<link id="TFileSearcher.CircularLinkDetection"/>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.IsDirectory"/>
<link id="#lazutils.lazfileutils.FileIsSymLink">FileIsSymLink</link>
</seealso>
</element>

<element name="TFileSearcher.FileAttribute">
<short>
File attribute needed for any file considered a match in the Search method.
</short>
<descr>
<p>
<var>FileAttribute</var> is a <var>Word</var> property. The default value for 
the property is <var>faAnyfile</var>, and means that any of the file 
attribute constants are allowed for files.
</p>
<p>
FileAttribute is used in the <var>Search</var> method to determine whether a 
file in a given search path can be considered a match based on its file 
attributes. The value is passed as an argument to <var>FindFirstUTF8</var> 
and <var>FindNextUTF8</var>. The value is compared to the file attributes 
returned in a <var>TSearchRec</var> instance from those routines.
</p>
<p>
Use <var>DirectoryAttribute</var> to specify the file attributes needed for 
directories processed in the Search method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileIterator.FileInfo"/>
<link id="#lazutils.lazfileutils.FindFirstUTF8">FindFirstUTF8</link>
<link id="#lazutils.lazfileutils.FindNextUTF8">FindNextUTF8</link>
<link id="#rtl.sysutils.TSearchRec">TSearchRec</link>
</seealso>
</element>

<element name="TFileSearcher.DirectoryAttribute">
<short>
File attribute needed for directories considered a match in the Search method.
</short>
<descr>
<p>
<var>DirectoryAttribute</var> is a <var>Word</var> property with the file 
attribute needed for directories considered a match in the Search method. The 
default value for the property is <var>faDirectory</var>.
</p>
<p>
DirectoryAttribute is used in the <var>Search</var> method to determine 
whether a file system entry in a given search path can be considered a match 
based on its file attributes. The value is passed as an argument to 
<var>FindFirstUTF8</var> and <var>FindNextUTF8</var>. The value is compared 
to the file attributes returned in a <var>TSearchRec</var> instance from 
those routines.
</p>
<p>
Use <var>FollowSymLink</var> to include or exclude directories which are 
symbolic links on the local file system.
</p>
<p>
Use <var>FileAttribute</var> to set the file attributes needed for files 
considered a match in the Search method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.FileAttribute"/>
<link id="TFileIterator.FileInfo"/>
<link id="#lazutils.lazfileutils.FindFirstUTF8">FindFirstUTF8</link>
<link id="#lazutils.lazfileutils.FindNextUTF8">FindNextUTF8</link>
<link id="#rtl.sysutils.TSearchRec">TSearchRec</link>
</seealso>
</element>

<element name="TFileSearcher.CircularLinkDetection">
<short>
Enables or disables detection of circular references when resolving symbolic 
links.
</short>
<descr>
<p>
The value in <var>CircularLinkDetection</var> is used, along with 
FollowSymLink, in the Search method. They control whether a file is a symbol 
link in a directory which has already been visited in the method.
</p>
<p>
When CircularLinkDetection and FollowSymLink are enabled, an internal hash of 
processed directory names is maintained in the method. If a file is encountered 
which resolves to one the already processed directories, it is not processed in 
the Search method.
</p>
<p>
The default value for the CircularLinkDetection property is <b>False</b>, and 
disables circular link detection.
</p>
</descr>
<version>
Added in LazUtils version 4.0.
</version>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.FollowSymLink"/>
<link id="#Lazutils.lazfileutils.FileIsSymLink">FileIsSymLink</link>
<link id="#Lazutils.lazfileutils.ReadAllLinks">ReadAllLinks</link>
</seealso>
</element>

<element name="TFileSearcher.OnDirectoryFound">
<short>
Event handler signalled when a new directory is found in the Search method.
</short>
<descr>
<p>
<var>OnDirectoryFound</var> is a <var>TDirectoryFoundEvent</var> property 
with the event handler signalled when a new directory is found in the Search 
method. It is signalled after values in the <var>Path</var>, 
<var>FileInfo</var>, and <var>Level</var> properties have been updated in the 
file iterator.
</p>
<p>
An application must implement and assign an object procedure to the handler 
to respond to the event notification. The <var>FileIterator</var> argument is 
the <var>TFileIterator</var> instance for the event notification, and allows 
access to its properties and methods. Call the <var>Stop</var> method in 
FileIterator to stop the search process.
</p>
<p>
Use <var>OnDirectoryEnter</var> to perform actions needed when a new 
directory is processed in the search method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileSearcher.OnDirectoryEnter"/>
<link id="TFileIterator"/>
<link id="TFileIterator.Path"/>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.Level"/>
<link id="TDirectoryFoundEvent"/>
</seealso>
</element>

<element name="TFileSearcher.OnFileFound">
<short>
Event handler signalled when a file matching the file mask is found in the 
Search method.
</short>
<descr>
<p>
<var>OnFileFound</var> is a <var>TFileFoundEvent</var> property with the 
event handler signalled when a file matching the search criteria is found in 
the Search method. It is signalled for each file that matches the search path 
and file mask arguments passed to the method. The event occurs after values 
in the <var>Path</var>, <var>FileInfo</var>, and <var>Level</var> properties 
have been updated in the file iterator.
</p>
<p>
An application must implement and assign an object procedure to the handler 
to respond to the event notification. The <var>FileIterator</var> argument is 
the <var>TFileIterator</var> instance for the event notification, and allows 
access to its properties and methods. Call the <var>Stop</var> method in 
FileIterator to stop the search process.
</p>
<p>
Use <var>OnDirectoryFound</var> to respond to directory names found in the 
Search method.
</p>
<p>
Use <var>OnDirectoryEnter</var> to respond to a new directory processed in 
the Search method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileSearcher.OnDirectoryEnter"/>
<link id="TFileIterator"/>
<link id="TFileIterator.Path"/>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.Level"/>
<link id="TFileFoundEvent"/>
</seealso>
</element>

<element name="TFileSearcher.OnDirectoryEnter">
<short>
Event handler signalled when a new directory is processed in the Search 
method.
</short>
<descr>
<p>
<var>OnDirectoryEnter</var> is a <var>TDirectoryEnterEvent</var> property 
with the event handler signalled when a new directory is processed in the 
<var>Search</var> method. It is signalled after the new directory name has 
been stored in Path, FileInfo, and Level in the file iterator. It occurs 
immediately before the search in the directory path is performed.
</p>
<p>
An application must implement and assign an object procedure to the handler 
to respond to the event notification. The <var>FileIterator</var> argument is 
the <var>TFileIterator</var> instance for the event notification, and allows 
access to its properties and methods. Call the <var>Stop</var> method in 
FileIterator to stop the search process.
</p>
<p>
Use <var>OnDirectoryFound</var> to respond to directory names found in the 
Search method.
</p>
<p>
Use <var>OnFileFound</var> to respond to a new file name processed as a match 
in the Search method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DirectoryAttribute"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileSearcher.OnFileFound"/>
<link id="TFileIterator"/>
<link id="TFileIterator.Path"/>
<link id="TFileIterator.FileInfo"/>
<link id="TFileIterator.Level"/>
<link id="TDirectoryEnterEvent"/>
</seealso>
</element>

<element name="TFileSearcher.OnQueryFileFound">
<short>
Event handler signalled to accept or reject a file name found using the class.
</short>
<descr>
<p>
<var>OnQueryFileFound</var> is a <var>TQueryFileFoundEvent</var> property with 
the event handler signalled to accept or reject a specific file name found in 
the Search method. OnQueryFileFound is signalled (when assigned) from the 
DoQueryFileFound method called during execution of the Search method.
</p>
<p>
An application can implement and assign a handler routine to respond to the 
notification. Use the parameters in the <link id="TQueryFileFoundEvent">
TQueryFileFoundEvent</link>  implementation to examine a specific file name, 
and set the return value which indicates whether the file name is accepted or 
rejected.
</p>
</descr>
<version>
Added in LCL version 4.0.  
</version>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DoQueryFileFound"/>
<link id="TFileSearcher.OnFileFound"/>
<link id="TQueryFileFoundEvent"/>
</seealso>
</element>

<element name="TFileSearcher.OnQueryDirectoryFound">
<short>
Event handler signalled to accept or reject a directory name found using the 
class.
</short>
<descr>
<p>
<var>OnQueryDirectoryFound</var> is a <var>TQueryDirectoryFoundEvent</var> 
property with the event handler signalled to accept or reject a specific 
directory path found in the Search method. OnQueryDirectoryFound is signalled 
(when assigned) from the DoQueryDirectoryEnter method called during execution 
of the Search method.
</p>
<p>
An application can implement and assign a handler routine to respond to the 
notification. Use the parameters in the <link id="TQueryDirectoryFoundEvent">
TQueryDirectoryFoundEvent</link>  implementation to examine a specific path 
name (directory), and set the return value which indicates whether the 
directory is accepted or rejected.
</p>
</descr>
<version>
Added in LCL version 4.0.
</version>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.DoQueryDirectoryEnter"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TQueryFileFoundEvent"/>
</seealso>
</element>

<element name="TFileSearcher.OnQueryDirectoryEnter">
<short>
Event handler signalled to accept or reject a subdirectory in the Search method.
</short>
<descr>
<p>
<var>OnQueryDirectoryEnter</var> is a <var>TQueryDirectoryFoundEvent</var> 
property signalled when a recursive directory search is performed in the Search 
method. It allows an application to accept or reject a directory name on a 
case-by-case basis even though it matches the path and mask provided to Search.
</p>
<p>
Arguments passed to the event handler include information about the current 
file system entry, the name for the directory, and a variable argument which 
indicates whether the directory is accepted or rejected. See 
<link id="TQueryDirectoryFoundEvent">TQueryDirectoryFoundEvent</link> for more 
information.
</p>
<p>
OnQueryDirectoryEnter is signalled (when assigned) from the Search method, and 
occurs when subdirectory searches have been enabled in the method.
</p>
<p>
Use OnQueryFileFound to accept or reject individual file names processed in the 
Search method.
</p>
</descr>
<version>
Added in LCL version 4.0.
</version>
<seealso>
<link id="TFileSearcher.Search"/>
<link id="TFileSearcher.OnQueryFileFound"/>
<link id="TQueryDirectoryFoundEvent"/>
</seealso>
</element>

<element name="TListFileSearcher">
<short>
Stores file names matching a search criteria in a TStrings class instance.
</short>
<descr>
<p>
<var>TListFileSearcher</var> is a <var>TFileSearcher</var> descendant used to 
used store file names matching a specified search criteria in a 
<var>TStrings</var> class instance. It provides an overridden methods used to 
add file names to the string list when a matching file name is found. An 
alternate constructor is provided to specify the TStrings instance used to 
store the file names found in the <var>Search</var> method.
</p>
<remark>
Resources allocated to the TStrings instance must be freed by the caller. 
TListFileSearcher does not own or manage the resources for the TStrings 
instance.
</remark>
</descr>
<seealso>
<link id="TFileSearcher"/>
</seealso>
</element>

<element name="TListFileSearcher.FList">
<short>
Internal list used to store matching file names in the file searcher.
</short>
</element>

<element name="TListFileSearcher.DoFileFound">
<short>
Performs actions required to add a file name to the list of matches for the 
file searcher.
</short>
<descr>
<p>
<var>DoFileFound</var> is an overridden method in 
<var>TListFileSearcher</var>. It adds the current value from the FileName 
property to the internal TStrings member maintained in the class instance. 
The inherited method is called prior to exit to signal the OnFileFound event 
handler (when assigned).
</p>
<p>
DoFileFound is called from the Search method when a file on the local file 
system is located that matches a given mask.
</p>
</descr>
<seealso>
<link id="TFileIterator.FileName"/>
<link id="TFileSearcher.OnFileFound"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TListFileSearcher.Create">
<short>
Constructor for the class instance.
</short>
<descr>
<p>
<var>Create</var> is an alternate constructor for the class instance. Create 
calls the inherited constructor, and stores the <var>TStrings</var> instance 
in <var>AList</var> to the internal member used in the class instance.
</p>
<remark>
Resources allocated to the TStrings instance must be freed by the caller. 
TListFileSearcher does not own or manage the resources for the TStrings 
instance.
</remark>
</descr>
<seealso/>
</element>
<element name="TListFileSearcher.Create.AList">
<short>
TStrings class instance used to store matching file names.
</short>
</element>

<element name="TListDirectoriesSearcher">
<short>
Stores directory names matching a given search criteria in a TStrings class 
instance.
</short>
<descr>
<p>
<var>TListDirectoriesSearcher</var> is a <var>TFileSearcher</var> descendant 
used to store directory names matching the specified search criteria in a 
TStrings class instance. It extends the ancestor class by implementing an 
internal member used to store the TStrings class instance.
</p>
<p>
Use the <var>PathSeparator</var> property to specify the separator used between 
path names passed as an argument to the <var>Search</var> method.
</p>
<p>
TListDirectoriesSearcher is used to implement the FindAllDirectories routine.
</p>
</descr>
<seealso>
<link id="TFileSearcher"/>
<link id="TFileSearcher.PathSeparator"/>
<link id="TFileSearcher.Search"/>
<link id="TListFileSearcher"/>
<link id="FindAllDirectories"/>
</seealso>
</element>

<element name="TListDirectoriesSearcher.FDirectoriesList">
<short>
Stores directory paths matching the specified search criteria.
</short>
</element>

<element name="TListDirectoriesSearcher.DoDirectoryFound">
<short>
Performs actions needed to add a directory path to the list of matches for 
the searcher.
</short>
<descr>
<p>
DoDirectoryFound is an overridden method in TListDirectoriesSearcher. It adds 
the current value from the FileName property to the internal TStrings member 
used in the class instance. The inherited method is called prior to exit to 
signal the OnDirectoryFound event handler (when assigned).
</p>
<p>
DoDirectoryFound is called from the Search method when a directory on the 
local file system is located that matches a given mask.
</p>
</descr>
<seealso>
<link id="TFileIterator.FileName"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

<element name="TListDirectoriesSearcher.Create">
<short>
Constructor for the class instance.
</short>
<descr>
<p>
<var>Create</var> is the constructor for the class instance. Create calls the 
inherited constructor, and stores the value in <var>AList</var> to the 
internal member used to capture matching directory names in the class 
instance.
</p>
<remark>
Resources allocated to the TStrings instance must be freed by the caller. 
TListFileSearcher does not own or manage the resources for the TStrings 
instance.
</remark>
</descr>
<seealso/>
</element>
<element name="TListDirectoriesSearcher.Create.AList">
<short>
TStrings class instance used to store directory names matching the specified 
search criteria.
</short>
<descr/>
<seealso/>
</element>

<element name="FindAllFiles">
<short>
Returns the list of files in the specified path matching the search criteria.
</short>
<descr>
<p>
<var>FindAllFiles</var> is a routine used to gather a list of file names found 
in the specified search paths which match the specified file masks. Overloaded 
variants are provided which allow the list of matching file names to be 
returned in different manners. 
</p>
<p>
The procedure variant uses an existing TStringList class instance to store the 
matching file names. The function variant creates a new TStringList instance 
which is used as the return value. It creates the string list internally. This 
may seem very convenient at first, but it is very easy to create memory leaks 
if string list instances are not freed properly.
</p>
<p>
FindAllFiles uses the <link id="TListFileSearcher">TListFileSearcher</link> 
class to perform the file search using the specified parameter values.
</p>
</descr>
<seealso>
<link id="TListFileSearcher"/>
</seealso>
<example file="examples/fileutil.findallfiles.pas"/>
</element>
<element name="FindAllFiles.Result">
<short>
TStringList instance with the file names matching the search criteria.
The StringList is created in the FindAllFiles function; you should not 
instantiate it before calling the function, and it must be freed in the calling 
routine.
</short>
</element>
<element name="FindAllFiles.AList">
<short>
TStringList used to store file names matching the search criteria. AList must 
be instantiated before it is passed as an argument to the method. The 
TStringList instance must also be freed by the routine where it was created.
</short>
</element>
<element name="FindAllFiles.SearchPath">
<short>
Base path for searching files.
</short>
</element>
<element name="FindAllFiles.SearchMask">
<short>
A list of file masks, separated by a semicolon (;), used to determine which 
files are a match in the routine. The mask can contain wildcards like * and ? 
and it also supports sets like [a-d,x]. See the Masks unit for more details. 
The default value is an empty string ('') and causes the all files mask for the 
platform to be used.
</short>
</element>
<element name="FindAllFiles.SearchSubDirs">
<short>
<b>True</b> to search for matching files in subdirectories. 
</short>
</element>
<element name="FindAllFiles.DirAttr">
<short>
Specifies the file attribute which indicates whether a file system entry is 
treated as a directory. It can contain <var>faDirectory</var>, 
<var>faSymLink</var>, (<var>faDirectory</var>+ <var>faSymLink</var>), or other 
bits can be used. The default value is faDirectory.
</short>
</element>
<element name="FindAllFiles.MaskSeparator">
<short>
Separator used between file masks in the SearchMask argument. Default value is 
';'.
</short>
</element>
<element name="FindAllFiles.PathSeparator">
<short>
Separator used between path names in the SearchPath argument. Default value is 
';'.
</short>
</element>

<element name="FindAllDirectories">
<short>
Stores directory names matching the search criteria in a TStringList class 
instance.
</short>
<descr>
<p>
<var>FindAllDirectories</var> is an overloaded routine used to store 
directory path names that match the specified search criteria in a 
<var>TStringList</var> class instance. The procedure variant uses an existing 
TStringList class instance to store the matching directory names. The 
function variant allocates a TStringList class instance used to capture the 
matching directory names.
</p>
</descr>
<seealso>
<link id="TListDirectoriesSearcher"/>
</seealso>
</element>
<element name="FindAllDirectories.Result">
<short>
Stores directory names matching the search criteria.
</short>
</element>
<element name="FindAllDirectories.AList">
<short>
Stores directory names matching the search criteria.
</short>
</element>
<element name="FindAllDirectories.SearchPath">
<short>
Path(s) to the directories examined in the routine.
</short>
</element>
<element name="FindAllDirectories.SearchSubDirs">
<short>
<b>True</b> to recurse into subdirectories in the search.
</short>
</element>
<element name="FindAllDirectories.PathSeparator">
<short>
Delimiter used between path names in the SearchPath parameter.
</short>
</element>

<element name="TCopyFileFlag">
<short>
Contains flags used to control actions performed in CopyFile or CopyDirTree.
</short>
<descr/>
<seealso>
<link id="TCopyFileFlags"/>
<link id="CopyFile"/>
<link id="CopyDirTree"/>
</seealso>
</element>
<element name="TCopyFileFlag.cffOverwriteFile">
<short>
Overwrites the destination file if it already exists.
</short>
</element>
<element name="TCopyFileFlag.cffCreateDestDirectory">
<short>
Create the directory for the destination fie if it does not already exist.
</short>
</element>
<element name="TCopyFileFlag.cffPreserveTime">
<short>
Preserves the timestamp for the source file in the destination file.
</short>
</element>

<element name="TCopyFileFlags">
<short>
Set type used to store TCopyFileFlag enumeration values.
</short>
<descr>
<p>
<var>TCopyFileFlags</var> is a set type used to store 0 or more values from 
the <var>TCopyFileFlag</var> enumeration. TCopyFileFlags is passed as an 
argument to the CopyFile and CopyDirTree routines.
</p>
</descr>
<seealso>
<link id="TCopyFileFlag"/>
<link id="CopyFile"/>
<link id="CopyDirTree"/>
</seealso>
</element>

<element name="CopyFile">
<short>
Copies the source file to the destination file using the specified options.
</short>
<descr>
<p>
<var>CopyFile</var> is an overloaded <var>Boolean</var> function used to copy 
the file in <var>SrcFilename</var> to the destination in 
<var>DestFilename</var>. Both parameters contain a fully-qualified path with 
file name and extension (if needed) for the respective files.
</p>
<p>
<var>Flags</var> contains <var>TCopyFileFlag</var> value(s) that are enforced 
in the copy operation. The default value for the parameter is 
<var>[cffOverwriteFile]</var> and indicates that the destination file is 
overwritten if it already exists on the local file system.
</p>
<p>
<var>PreserveTime</var> indicates if the timestamp for the source file is 
preserved in the destination file when the copy operation has been completed. 
It is an alternative to using the Flags arguments in the overloaded variant.
</p>
<p>
The return value is set to <b>True</b> when the copy operation has been 
completed successfully. Otherwise, the return value is <b>False</b>.
</p>
</descr>
<errors>
An Exception is raised if the copy process does not complete successfully or 
correctly.
</errors>
</element>
<element name="CopyFile.Result">
<short>
Returns <b>True</b> if successful, <b>False</b> if there was an error.
</short>
</element>
<element name="CopyFile.SrcFilename">
<short>
The source file name for the copy operation.
</short>
</element>
<element name="CopyFile.DestFilename">
<short>
The destination file name for the copy operation.
</short>
</element>
<element name="CopyFile.Flags">
<short>
Set with flags enabled for the copy operation.
</short>
</element>
<element name="CopyFile.PreserveTime">
<short>
If <b>True</b>, the timestamp of the original file is preserved in the copied 
file.
</short>
</element>
<element name="CopyFile.ExceptionOnError">
<short>
If <b>True</b>, and exception is raised if the copy operation cannot be 
performed.
</short>
</element>

<element name="CopyDirTree">
<short>
Copies all file system entries in a source directory to the destination 
directory using the specified options.
</short>
<descr>
<p>
<var>CopyDirTree</var> is a <var>Boolean</var> function used to copy file 
system entries from the directory in <var>SourceDir</var> to the directory in 
<var>TargetDir</var>.
</p>
<p>
Values in SourceDir and TargetDir are fully-qualified path names for the 
directories. If a trailing path delimiter is omitted in SourceDir or 
TargetDir, it is appended (when needed) to the values. TargetDir cannot be a 
sub-directory located in SourceDir. No actions are performed in the routine 
when TargetDir is located within the specified SourceDir.
</p>
<p>
Flags contains values representing the options enabled in the copy operation. 
The default value for the parameters is an empty set (<b>[]</b>) and 
indicates that none of the <var>TCopyFileFlag</var> options are enabled. The 
value <var>cffCreateDestDirectory</var> is always added to the values in 
Flags internally; CopyDirTree requires the destination directory to be 
created if it does not already exist.
</p>
<p>
See <link id="TCopyFileFlag">TCopyFileFlag</link> for more information about 
the option values and their meanings.
</p>
<p>
The return value is <b>True</b> when all file system entries in SourceDir are 
successfully copied in the routine. Please note that a portion of the copy 
operation may have been performed successfully even when the return value is 
<b>False</b>.
</p>
<p>
Use <var>CopyFile</var> to copy a single file with a given name to a new file 
name.
</p>
</descr>
<seealso>
<link id="CopyFile"/>
<link id="TCopyFileFlags"/>
</seealso>
</element>
<element name="CopyDirTree.Result">
<short>
<b>True</b> when all files are successfully copied in the routine.
</short>
</element>
<element name="CopyDirTree.SourceDir">
<short>
Directory with the files copied in the routine.
</short>
</element>
<element name="CopyDirTree.TargetDir">
<short>
Directory where the copied files are stored.
</short>
</element>
<element name="CopyDirTree.Flags">
<short>
Options enabled for the copy operation; default value is an empty set ([])
</short>
</element>

<element name="PascalFileExt">
<short>
File extensions used for Pascal source code files.
</short>
<descr>
<p>
<var>PascalFileExt</var> is an <b>array constant</b> which contains the file 
extensions (including the initial '.') used for Pascal source code files 
(units).
</p>
</descr>
<seealso>
<link id="PascalSourceExt"/>
</seealso>
</element>

<element name="PascalSourceExt">
<short>
File extensions considered to be a Pascal source, project or package file.
</short>
<descr>
<p>
<var>PascalSourceExt</var> is an <b>array constant</b> which contains the 
file extensions (including the initial '.') used for Pascal source code 
files. Similar to <var>PascalFileExt</var>, but includes extensions used for 
project and package files.
</p>
</descr>
<seealso>
<link id="PascalFileExt"/>
</seealso>
</element>

<element name="AllDirectoryEntriesMask">
<short>
File mask used to match all directories entries on the local file system.
</short>
<descr>
<p>
Used in the implementation of the <var>TFileSearcher.Search</var> method.
</p>
</descr>
<seealso>
<link id="TFileSearcher.Search"/>
</seealso>
</element>

</module>
<!-- FileUtil -->
</package>
</fpdoc-descriptions>