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
|
<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="lazutils">
<!--
====================================================================
LazFileUtils
====================================================================
-->
<module name="LazFileUtils">
<short>
Contains procedures and functions used for file and directory operations
</short>
<descr>
<p>
LazFileUtils contains procedures and functions used for file and directory operations. This file is part of the LazUtils package.
</p>
<remarks>
All functions are thread safe unless explicitly stated.
</remarks>
</descr>
<!-- function Visibility: default -->
<element name="CompareFilenames">
<short>
Gets the relative sort order for the specified file names
</short>
<descr>
<p>
CompareFilenames is an overloaded Integer function used to compare the specified file names to get their relative order in sorting operations. CompareFilenames provides implementations which accept String or PChar values (and their lengths) as arguments. The implementations are platform- and/or OS-specific; they consider whether the file system is case sensitive or when UTF-8 encoding is supported.
</p>
<p>
The return value indicates the relative order in a sort operation, and can contain the following values:
</p>
<dl>
<dt><code> <0 </code></dt>
<dd>Filename1 comes before Filename2</dd>
<dt><code> 0 </code></dt>
<dd>Filename1 and Filename2 to have the same value</dd>
<dt><code> >0 </code></dt>
<dd>Filename1 comes after Filename2</dd>
</dl>
</descr>
<errors></errors>
<seealso>
<link id="CompareFilenamesIgnoreCase"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="CompareFilenames.Result">
<short>Relative sort order for the specified file names</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Filename1">
<short>First file name for the comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Filename2">
<short>Second file name for the comparison</short>
</element>
<!-- function Visibility: default -->
<element name="CompareFilenamesIgnoreCase">
<short>
Gets the relative sort order for case-insensitive file names
</short>
<descr>
<p>
CompareFilenamesIgnoreCase is an overloaded Integer function used to compare the specified file names to get their relative order in case-insensitive sorting operations. CompareFilenamesIgnoreCase provides alternate implementations which accept String or PChar values (and their lengths) as arguments. The implementations are platform- and/or OS-specific; they consider whether the file system is case sensitive or when UTF-8 encoding is supported.
</p>
<p>
The return value indicates the relative order in a case-insensitive sort operation, and can contain the following values:
</p>
<dl>
<dt><code> <0 </code></dt>
<dd>Filename1 comes before Filename2</dd>
<dt><code> 0 </code></dt>
<dd>Filename1 and Filename2 to have the same value</dd>
<dt><code> >0 </code></dt>
<dd>Filename1 comes after Filename2</dd>
</dl>
</descr>
<errors></errors>
<seealso>
<link id="CompareFilenames"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="CompareFilenamesIgnoreCase.Result">
<short>Relative sort order for the file names</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenamesIgnoreCase.Filename1">
<short>First file name for the comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenamesIgnoreCase.Filename2">
<short>Second file name for the comparison</short>
</element>
<!-- function Visibility: default -->
<element name="CompareFileExt">
<short>
Performs a sort order comparision for the specified file name and extension
</short>
<descr>
<p>
CompareFileExt is an Integer function used to compare the file extension in FIlename to the value in Ext. Ext may contain the '.' character, but it is not required and will be removed for the comparison. CaseSensitive indicates whether case is ignored in the comparision. When CaseSensitive contains True, CompareStr is called to perform the comparison. Otherwise, UTF8CompareText is called to compare the values. The return value will contain one of the following:
</p>
<dl>
<dt>-1</dt>
<dd>
Filename value has a lower sort order value than Ext
</dd>
<dt>0</dt>
<dd>
Filename and Ext have the same sort order values
</dd>
<dt>1</dt>
<dd>
Filename value has a higher sort order value than Ext
</dd>
</dl>
<p>
The return is 1 if Filename does not contain a file extension.
</p>
</descr>
<errors></errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="CompareFileExt.Result">
<short>Relative sort order for the compared values</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.Filename">
<short>File name for the comparision</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.Ext">
<short>File extension for the comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.CaseSensitive">
<short>True if case sensitive comparison is needed</short>
</element>
<!-- function Visibility: default -->
<element name="CompareFilenameStarts">
<short>
Compares file names using the number characters in common
</short>
<descr>
<p>
CompareFilenameStarts is an Integer function used to compare the specified file names to determine their relative sort order. Arguments in Filename1 and Filename2 do not need to be the same length. When they have different lengths, the number of characters common to both are used in the comparison. CompareFilenameStarts calls CompareFileNames to perform the comparison, and get the return value for the function.
</p>
<p>
See CompareFilename for more information about the numeric return value and its meaning.
</p>
</descr>
<seealso>
<link id ="CompareFileNames">CompareFIlenames</link>
<link id ="CompareFileName">CompareFIlename</link>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="CompareFilenameStarts.Result">
<short>Relative sort order for the compared values</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenameStarts.Filename1">
<short>First file name for the comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenameStarts.Filename2">
<short>Second file name for the comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Len1">
<short>Length of the first file name</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Len2">
<short>Length of the seconds file name</short>
</element>
<!-- function Visibility: default -->
<element name="DirPathExists">
<short>
Indicates if the specified directory name exists in the file system
</short>
<descr>
<p>
DirPathExists is a Boolean function which indicates if the specified directory name exists in the file system. DirectoryName can contain a trailing path delimiter, but it removed in the function. DirPathExists calls DirectoryExistsUTF8 to get the return value.
</p>
</descr>
<seealso>
<link id="DirectoryExistsUTF8"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="DirPathExists.Result">
<short>True when the specified directory exists in the file system</short>
</element>
<!-- argument Visibility: default -->
<element name="DirPathExists.DirectoryName">
<short>DIrectory Name to locate</short>
</element>
<!-- function Visibility: default -->
<element name="DirectoryIsWritable">
<short>
Indicates if the specified directory name is writable
</short>
<descr>
<p>
DirectoryIsWritable is a Boolean function used to determine if the specified directory name is writable in the file system. The path name in DirectoryName must already exist on the local file system. The return value is False if a directory with the specified name does not exist.
</p>
<p>
The return value is True when a file can be added, deleted, or modified in the specified path. To get the return value, DirectoryIsWritable creates a temporary file in DirectoryName, adds content to it, and deletes the temporary file. DirectoryIsWritable calls the FileCreateUTF8, FileWrite, FileClose, and DeleteFileUTF8 routines to perform the file operations. The return value is True when FileWrite completes successfully.
</p>
<remarks>
Please note: DirectoryIsWritable calls InvalidateFileStateCache with the temporary file name if DeleteFileUTF8 cannot remove the file.
</remarks>
</descr>
<errors>
</errors>
<seealso>
<link id="FileCreateUTF8"/>
<link id="FileWrite"/>
<link id="FileClose"/>
<link id="DeleteFileUTF8"/>
<link id="InvalidateFileStateCache"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="DirectoryIsWritable.Result">
<short>True if the specified directory is writable</short>
</element>
<!-- argument Visibility: default -->
<element name="DirectoryIsWritable.DirectoryName">
<short>Directory name to examine in the function</short>
</element>
<!-- function Visibility: default -->
<element name="ExtractFileNameOnly">
<short>
Gets the base file name (without the file extension) in the specified path
</short>
<descr>
<p>
ExtractFileNameOnly is a String function used to extra the base file name (without the file extension) from the value in AFilename. Path information, up to the last directory separator ('/' or '\') or device separator (':') character, in AFileName is ignored. The file extension, starting at the '.' character, is also omitted.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="ExtractFileNameOnly.Result">
<short>Base file name in the file path</short>
</element>
<!-- argument Visibility: default -->
<element name="ExtractFileNameOnly.AFilename">
<short>File path and name to examine in the function</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsAbsolute">
<short>
Determines if the specified value is an absolute file path (not a relative one)
</short>
<descr>
<p>
FilenameIsAbsolute is a Boolean function used to determine if the value in TheFilename contains an absolute file path (and not a relative one). The implementation for FilenameIsAbsolute is platform- and/or OS-specific.
</p>
<p>
In UNIX-like environments, the FilenameIsUnixAbsolute function is used in the implementation. The return value is False if TheFilename is an empty string (''), or does not start with the directory separator for the environment.
</p>
<p>
On Windows, the FilenameIsWinAbsolute function is called in the implementation. FilenameIsWinAbsolute takes Device identifiers into consideration when examining the value in TheFilename. For example:
</p>
<code>
D:\db\employee.fdb
</code>
<p>
The return value is False if TheFilename (without the optional device identifier) is an empty string (''), or does not start with the directory separator for the environment.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsAbsolute.Result">
<short>True when the file name is not a relative path</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsAbsolute.TheFilename">
<short>Path and file name to use in the function</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsWinAbsolute">
<short>
Determines if the specified value is an absolute file path (not a relative one)
</short>
<descr>
<p>
FilenameIsWinAbsolute is a Boolean function used to determine if the value in TheFilename contains an absolute file path (and not a relative one).
</p>
<p>
On Windows, the FilenameIsWinAbsolute function is called in the implementation of FilenameIsAbsolute. FilenameIsWinAbsolute takes Device identifiers into consideration when examine the value in TheFilename. For example:
</p>
<code>
D:\db\employee.fdb
</code>
<p>
The return value is False if TheFilename (without the optional device identifier)is an empty string (''), or does not start with the directory separator for the environment.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsWinAbsolute.Result">
<short>True when the file name is not a relative path</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsWinAbsolute.TheFilename">
<short>Path and file name to use in the function</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsUnixAbsolute">
<short>
Determines if the specified value is an absolute file path (not a relative one)
</short>
<descr>
<p>
FilenameIsUnixAbsolute is a Boolean function used to determine if the value in TheFilename contains an absolute file path (and not a relative one).
</p>
<p>
In UNIX-like environments, the FilenameIsUnixAbsolute function is used in the implementation of FilenameIsAbsolute. The return value is False if TheFilename is an empty string (''), or does not start with the directory separator for the environment.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsUnixAbsolute.Result">
<short>True when the file name is not a relative path</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsUnixAbsolute.TheFilename">
<short>Path and file name to use in the function</short>
</element>
<!-- function Visibility: default -->
<element name="ForceDirectory">
<short>
Creates the specified directory if it does not already exist
</short>
<descr>
<p>
<var>ForceDirectory</var> is a Boolean function which creates the specified directory if it does not already exist. ForceDirectory ensures that a trailing path delimiter exists in DirectoryName prior to checking the file system. Each directory in the specified path is examined in the function using DirPathExists. ForceDirectory calls CreateDirUTF8 if a directory does not exist, and may exit with a return value of False if directory creation is not successful.
</p>
<p>
The return value is True if all directories in the path information already exist, or are successfully created in the function.
</p>
</descr>
<seealso>
<link id="ForceDirectoriesUTF8"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="ForceDirectory.Result">
<short>Returns True if directory exists or if it was successfully created</short>
</element>
<!-- argument Visibility: default -->
<element name="ForceDirectory.DirectoryName">
<short>Path information for the operation</short>
</element>
<!-- procedure Visibility: default -->
<element name="CheckIfFileIsExecutable">
<short>
Examines the specified file to see if it is executable
</short>
<descr>
<p>
CheckIfFileIsExecutable is a procedure used to examine the specified file name to see if it is executable. CheckIfFileIsExecutable is implemented for UNIX-like environments, and allows TProcess to better determine if the file can be executed on the platform or OS, and to get better error messages when it cannot.
</p>
<p>
CheckIfFileIsExecutable raises an exception with a specific mesage when the platform or OS facilities indicate it is necessary.
</p>
<p>
Use FileIsExecutable to determine of a file is executable without raising an exception.
</p>
</descr>
<errors>
<p>
The Exception contains the following messages (from string resources):
</p>
<dl>
<dt>lrsFileDoesNotExist</dt>
<dd>
Raised when FileExistsUTF8 returns False
</dd>
<dt>lrsFileIsADirectoryAndNotAnExecutable</dt>
<dd>
Raised when DirPathExists indicates the file is actually a directory name
</dd>
<dt>lrsReadAccessDeniedFor</dt>
<dd>
Raised when fpGetErrno() returns ESysEAcces
</dd>
<dt>lrsADirectoryComponentInDoesNotExistOrIsADanglingSyml</dt>
<dd>
Raised when fpGetErrno() returns ESysENoEnt
</dd>
<dt>lrsADirectoryComponentInIsNotADirectory</dt>
<dd>
Raised when fpGetErrno() returns ESysENotDir
</dd>
<dt>lrsInsufficientMemory</dt>
<dd>
Raised when fpGetErrno() returns ESysENoMem
</dd>
<dt>lrsHasACircularSymbolicLink</dt>
<dd>
Raised when fpGetErrno() returns ESysELoop
</dd>
<dt>lrsIsNotExecutable</dt>
<dd>
Raised when fpGetErrno() has a value other than the above
</dd>
</dl>
</errors>
<seealso>
<link id="#fcl.Process.TProcess"/>
</seealso>
</element>
<!-- argument Visibility: default -->
<element name="CheckIfFileIsExecutable.AFilename">
<short>File name to examine</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsExecutable">
<short>
Determine if the specified file name is executable
</short>
<descr>
<p>
FileIsExecutable is a Boolean function used to determine if the specified file name is executable. For UNIX-like environments, a combination of FpStat, FPS_ISREG, and FpAccess are used to get the return value. For the Windows enviroment, the value fromFileExistsUTF8 is used as the return value. In short, the function is not really useful in a Windows environment.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsExecutable.Result">
<short>True if the file is executable on the platform or OS</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsExecutable.AFilename">
<short>File name to examine</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsReadable">
<short>
Indicates if the specified file name is readable
</short>
<descr>
<p>
FileIsReadable is a Boolean function which indicates if the specified file name is readable. For UNIX-like environments, FpAccess is used to get the return value. On Windows, the return value is the result from FileExistsUTF8. In short, the function is not really useful on the Windows platform.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsReadable.Result">
<short>True when the specified file name is readable</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsReadable.AFilename">
<short>File name to examine</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsWritable">
<short>
Indicates if the specified file name is writable
</short>
<descr>
<p>
FileIsWritable is a Boolean function which indicates if the specified file name is writable. For UNIX-like environments, FpAccess is used to get the return value. For Windows, FileGetAttrUTF8 is used to determine if faReadOnly is omitted from the attributes for the file.
</p>
</descr>
<errors></errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsWritable.Result">
<short>True when the specified file name is writable</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsWritable.AFilename">
<short>File name to examine</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsText">
<short>
Determine if the specified file contains plain text content
</short>
<descr>
<p>
FileIsText is a Boolean function used to determine if the specified file contains plain text content. The overloaded variant that includes the FileReadable argument is used to examine the content in the file.
</p>
<p>
FileIsText calls FileOpenUtf8 for the specified file name. The return value is False is the file handle contains feInvalidHandle.
</p>
<p>
FileIsText checks for (and skips) common Byte Order Marks, such as:
</p>
<ul>
<li>UTF-8 BOM (Hex $EF $BB $BF)</li>
<li>UCS-2LE BOM (Hex $FF $FE)</li>
<li>UCS-2BE BOM (Hex $FE $FF)</li>
</ul>
<p>
Content in the file (up to 1024 characters) is checked to ensure that invalid Null and Control characters are not found in the file. The return value is True when the specified file name exists in the local file system, and does not contain Null or Control characters.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsText.Result">
<short>True when the file contains plain text content</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsText.AFilename">
<short>File name to examine in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsText.FileReadable">
<short>Indicates if the specified file was successfully opened and read</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsTrimmed">
<short></short>
<descr>
<p>
FilenameIsTrimmed is an overloaded Boolean function used to determine if the specified file name contains characters ro remove or resolve before use. The variant which uses PChar values performs the comparison. The return value is False when the file name is a candidate for use of TrimFilename to remove whitespace or special characters.
</p>
<p>
Use TrimFilename to remove leading or trailing whitespace, duplicate directory separators, or relative path symbols.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsTrimmed.Result">
<short>False when the file name needs to trimmed</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsTrimmed.TheFilename">
<short>File name to examine in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsTrimmed.StartPos">
<short>PChar with the file name value</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsTrimmed.NameLen">
<short>Length of the file name</short>
</element>
<!-- function Visibility: default -->
<element name="TrimFilename">
<short>
Removes leading and trailing spaces, and resolves special characters
</short>
<descr>
<var>TrimFilename</var> is a String function used to remove leading and trailing spaces (Decimal 32) in the specified path and file name. In addition, ResolveDots is called to expand directory characters (like '.' and '..') and to remove duplicate path delimiters (like '//').
</descr>
<errors></errors>
<seealso>
<link id="ResolveDots"/>
<link id="FileNameIsTrimmed"/>
<link id="CleanAndExpandFilename"/>
<link id="CleanAndExpandDirectory"/>
<link id="TrimAndExpandFilename"/>
<link id="TrimAndExpandDirectory"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="TrimFilename.Result">
<short>New value for the path and file name</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimFilename.AFilename">
<short>Path and file name for the operation</short>
</element>
<!-- function Visibility: default -->
<element name="CleanAndExpandFilename">
<short>
Removes whitespace and resolve special characters in the specified file name
</short>
<descr>
<p>
CleanAndExpandFilename is a String function used to remove whitespace and to resolve special characters in the specified file name. CleanAndExpandFilename calls TrimFilename and ExpandFileNameUTF8 to get the return value for the function. The return value is the current directory when Filename contains an empty string ('').
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="CleanAndExpandFilename.Result">
<short>File name with whitespace removed and special charcters resolved</short>
</element>
<!-- argument Visibility: default -->
<element name="CleanAndExpandFilename.Filename">
<short>File name to examine in the function</short>
</element>
<!-- function Visibility: default -->
<element name="CleanAndExpandDirectory">
<short>
Removes whitespace and resolves special characters in the specified path
</short>
<descr>
<p>
CleanAndExpandDirectory is a String function used to remove whitespace and resolve special characters in the specified path. CleanAndExpandDirectory calls CleanAndExpandFilename to get the return value for the function. CleanAndExpandDirectory calls AppendPathDelim to ensure that a trailing path delimiter is included in the return value. The return value is the current directory when the specified path contains an empty string ('').
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="CleanAndExpandDirectory.Result">
<short>
Path information after removing whitespace and resolving special characters
</short>
</element>
<!-- argument Visibility: default -->
<element name="CleanAndExpandDirectory.Filename">
<short>Path information for the function</short>
</element>
<!-- function Visibility: default -->
<element name="TrimAndExpandFilename">
<short>
Cleans and resolves a file path to the specified base directory name
</short>
<descr>
<p>
TrimAndExpandFilename is a String function used to remove whitespace and special characters in Filename, and to resolve the relative file path to the directory in BaseDir. TrimAndExpandFilename removes a trailing path delimiter in FIlename, and calls ExpandFileNameUTF8 and TrimFilename to get the return value for the function.
</p>
<p>
The return value is an empty string ('') if Filename contains an empty string ('').
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="TrimAndExpandFilename.Result">
<short>Cleaned and resolved file path</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimAndExpandFilename.Filename">
<short>File name for the function</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimAndExpandFilename.BaseDir">
<short>Base directory name used for a relative file path</short>
</element>
<!-- function Visibility: default -->
<element name="TrimAndExpandDirectory">
<short>
Cleans and resolves a relative path to a base directory
</short>
<descr>
<p>
TrimAndExpandDirectory is a String function used to remove whitespace and special characters in the path information, and to resolve a relative path to the specified base directory.
</p>
<p>
TrimAndExpandDirectory calls TrimFilename. The return value is an empty string ('') when TrimFilename returns an empty string ('').
</p>
<p>
TrimAndExpandDirectory calls ExpandFileNameUTF8 to resolve the relative path, and calls TrimFilename to get the return value for the function.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="TrimAndExpandDirectory.Result">
<short>Path information cleaned and resolved to the specified base directory</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimAndExpandDirectory.Filename">
<short>Path information for the function</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimAndExpandDirectory.BaseDir">
<short>Base directory used to resolve a relative path</short>
</element>
<!-- function Visibility: default -->
<element name="CreateRelativePath">
<short>
Creates a relative path from BaseDirectory to Filename
</short>
<descr>
<p>
CreateRelativePath is a String function used to get the relative path from BaseDirectory to Filename. A trailing path delimiter in BaseDirectory is ignored. If there is no relative path, the value in Filename is returned.
</p>
<p>
When BaseDirectory and Filename contain the same value, and UsePointDirectory is False, an empty string ('') is used as the return value. If UsePointDirectory contains True, the return value is '.'. Duplicate path delimiters are removed. For example, the following is True:
</p>
<code>
TrimFilename(Filename) = TrimFilename(BaseDirectory+PathDelim+Result).
</code>
<remarks>
CreateRelativePath is thread safe and therefore does not guarantee that the current directory is correct for file names like 'D:test.txt'.
</remarks>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="CreateRelativePath.Result">
<short>Relative path from the base directory for the file name</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateRelativePath.Filename">
<short>File name for the operation</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateRelativePath.BaseDirectory">
<short>Base directory for the relative path</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateRelativePath.UsePointDirectory">
<short>
True if '.' (current directory symbol) is prepended to the relative path
</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsInPath">
<short>
Returns True if Filename exists in the specified Path
</short>
<descr>
<p>
FileIsInPath is a Boolean function which indicates if the file name exists in the specified path. Filename is the file name to locate, and may include optional relative path information. For example: '../filename.txt'.
</p>
<p>
Path is the directory name used to locate the specified file. For example: '/usr/lib/fpc'.
</p>
<p>
The returns value is True when Filename is a file or directory somewhere below Path. For example, under UNIX the Filename '/usr/lib/fpc' is below Path '/usr/lib', '/usr' and '/'. When Filename and Path contain the same value, the return value is False. Please note: the return value is False when Path contains an empty string ('').
</p>
<p>
FileIsInPath calls ResolveDots to resolve relative path information in both Filename and Path, and ensures that a trailing path delimiter is included in Path when needed. FileIsInPath calls CompareFileNames.
</p>
<remarks>
This is a logical test; FileIsInPath does not expand or follow symbolic links.
</remarks>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsInPath.Result">
<short>True when the file exists in the specified path</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInPath.Filename">
<short>File name to locate</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInPath.Path">
<short>Path used for the operation</short>
</element>
<!-- function Visibility: default -->
<element name="AppendPathDelim">
<short>
Adds a trailing path delimiter when needed
</short>
<descr>
<p>
AppendPathDelim is a String function used to ensure that a trailing path delimiter is included in the specified Path. The return value includes the value in Path and the trailing path delimiter (when needed).
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="AppendPathDelim.Result">
<short>Path value with a trailing path delimiter</short>
</element>
<!-- argument Visibility: default -->
<element name="AppendPathDelim.Path">
<short>Path value to examine</short>
</element>
<!-- function Visibility: default -->
<element name="ChompPathDelim">
<short>
Removes a trailing path delimiter from the specified value
</short>
<descr>
<p>
ChompPathDelim is a String function used to remove a trailing path delimiter from the specified value in Path. For environments where UNC paths are allowed, ChompPathDelim ensures that the UNC path delimiters are retained. Windows Device identifiers, such as "D:" are also retained in Path.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="ChompPathDelim.Result">
<short>Path information after removing the trailing path delimiter</short>
</element>
<!-- argument Visibility: default -->
<element name="ChompPathDelim.Path">
<short>Path information for the function</short>
</element>
<!-- function Visibility: default -->
<element name="FileExistsUTF8">
<short>
Indicates if the specified file name exists
</short>
<descr>
<p>
FileExistsUTF8 is a Boolean function which indicates if the specified file name exists in the local file system. For the Windows environment, FileExistsUTF8 uses FileGetAttrUTF8 to ensure that Filename does not have the FILE_ATTRIBUTE_DIRECTORY attribute. For UNIX-like environments, the FileExists function in SysUtils is used to get the return value.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileExistsUTF8.Result">
<short>True when the specified file name exists</short>
</element>
<!-- argument Visibility: default -->
<element name="FileExistsUTF8.Filename">
<short>File name to locate in the file system</short>
</element>
<!-- function Visibility: default -->
<element name="FileAgeUTF8">
<short>
Returns the last modification time for the file in FileDate format
</short>
<descr>
<p>
FileAgeUTF8 is a Longint function which returns the last modification time for the file in FileName. FileAgeUTF8 cannot be used on directories, and returns -1 if FileName indicates a directory.
</p>
<p>
For UNIX-like environments, the return value is provided by the FileAge function in SysUtils. For the Windows environment, FindFirstFileW is used to get TWin32TWin32FindDataW data for the specified file. Its ftLastWriteTime value is converted using WinToDosTime to get the return value for the function.
</p>
<p>
The return value is in FIleDate format, and can be transformed to TDateTime format with the FileDateToDateTime function.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileAgeUTF8.Result">
<short>Last modification time for the file in FileDate format</short>
</element>
<!-- argument Visibility: default -->
<element name="FileAgeUTF8.FileName">
<short>File name for the function</short>
</element>
<!-- function Visibility: default -->
<element name="DirectoryExistsUTF8">
<short>
Determine if the specified path exists on the local file system
</short>
<descr>
<p>
DirectoryExistsUTF8 is Boolean function used to determine if the specified path exists on the local file system. For the Windows environment, FileGetAttrUTF8 is called to see if FILE_ATTRIBUTE_DIRECTORY is include in the file attributes for Directory. For UNIX-like environments, the DirectoryExists function in SysUtils is used to get the return value.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="DirectoryExistsUTF8.Result">
<short>True when the directory exists in the file system</short>
</element>
<!-- argument Visibility: default -->
<element name="DirectoryExistsUTF8.Directory">
<short>Directory name to locate in the file system</short>
</element>
<!-- function Visibility: default -->
<element name="ExpandFileNameUTF8">
<short>
Expands the values in FileName and BaseDir to an absolute file name
</short>
<descr>
<p>
ExpandFileNameUTF8 is a String function which expands the UTF-8-encoded values in FileName and BaseDir to an absolute file name. It changes all directory separator characters to the one appropriate for the system.
</p>
<p>
If an empty string ('') is passed in Filename, it is expanded to the current directory using GetCurrentDirUTF8. When FileName contains the tilde character ('~'), it is converted to the path to the home directory for the user using the HOME environment variable. Relative paths in FileName are resolved by calling ResolveDots.
</p>
</descr>
<errors></errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="ExpandFileNameUTF8.Result">
<short>File name with an absolute path</short>
</element>
<!-- argument Visibility: default -->
<element name="ExpandFileNameUTF8.FileName">
<short>File name for the operation</short>
</element>
<!-- argument Visibility: default -->
<element name="ExpandFileNameUTF8.BaseDir">
<short>Base directory for the operation</short>
</element>
<!-- function Visibility: default -->
<element name="FindFirstUTF8">
<short>
Starts searching for files matching the specified path value
</short>
<descr>
<p>
FindFirstUTF8 searches the file specified in Path. Normal files, as well as all special files which have the attributes specified in Attr will be returned.
</p>
<p>
It returns a SearchRec record for further searching in Rslt. Path can contain the wildcard characters; ? (matches any single character) and * (matches 0 or more arbitrary characters). In this case FindFirstUTF8 will return the first file which matches the specified criteria.
</p>
<p>
If GetLastError is different from zero, no files matching the criteria were found. The return value is the value from GetLastError.
</p>
</descr>
<errors></errors>
<seealso>
<link id="#rtl.Dos.FIndFirst"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="FindFirstUTF8.Result">
<short>Last error number encountered in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FindFirstUTF8.Path">
<short>Path and/or file name to locate</short>
</element>
<!-- argument Visibility: default -->
<element name="FindFirstUTF8.Attr">
<short>File attributes to include in the search</short>
</element>
<!-- argument Visibility: default -->
<element name="FindFirstUTF8.Rslt">
<short>Search record for the first matching file</short>
</element>
<!-- function Visibility: default -->
<element name="FindNextUTF8">
<short>
Locates another file matching the search criteria
</short>
<descr>
<p>
FindNextUTF8 is a Longint function used to locate another file matching the TSearchRec value in Rslt. Rslt is populated in a prior call to FindFirstUTF8, and updated in FindNextUTF8.
</p>
<p>
For the Windows environment, FindNextFileW is called to compare the TWIN32FINDDATAW for the matching file. For UNIX-like environments, the FindNext function in SysUtils is used.
</p>
<p>
The return value contains the result from GetLastError; a non-zero value indicates that an error was encountered.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FindNextUTF8.Result">
<short>Last error number</short>
</element>
<!-- argument Visibility: default -->
<element name="FindNextUTF8.Rslt">
<short>Search criteria for the function</short>
</element>
<!-- procedure Visibility: default -->
<element name="FindCloseUTF8">
<short>
Frees resources allocated to the specified search record
</short>
<descr>
<p>
FindCloseUTF8 is a procedure used to free resources allocated to the search record in F. FindCloseUTF8 is needed to free the internal resources allocated to the search record in FindFirstUTF8. FindCloseUTF8 calls the FindClose function in SysUtils.
</p>
</descr>
<seealso></seealso>
</element>
<!-- argument Visibility: default -->
<element name="FindCloseUTF8.F">
<short>Search record to free in the procedure</short>
</element>
<!-- function Visibility: default -->
<element name="FileSetDateUTF8">
<short>
Sets the last modification time for the file
</short>
<descr>
<p>
FileSetDateUTF8 is a Longint function used to set the last modification time for the file to the specified Age in FileDate format. Use DateTimeToFileDate to convert a TDateTime value to FileDate format.
</p>
<p>
For the Windows enviroment, a handle is created for the specified file name, and SetFileTime is called to store the updated file age. For UNIX-like enviroments, FileSetDate in SysUtils is called to set the file age. InvalidateFileStateCache is also called for the specified file name.
</p>
<p>
The return value is the value from GetLastError; a non-zero value indicates that an error has occurred.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileSetDateUTF8.Result">
<short>Last error number in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSetDateUTF8.FileName">
<short>File name to update in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSetDateUTF8.Age">
<short>New value for the last modification time</short>
</element>
<!-- function Visibility: default -->
<element name="FileGetAttrUTF8">
<short>
Gets the value of file attributes for the specified file name
</short>
<descr>
<p>
FileGetAttrUTF8 is a Longint function used to get files attributes for the specified file name. For the Windows enviroment, GetFileAttributesW in Windows is called to the file attribute value for Filename. For UNIX-like enviroments, FileGetAttr in SysUtils is called to the the return value.
</p>
<p>
The return value contains a numeric value that can be OR-ed with the following constants to get a specific file attribute:
</p>
<dl>
<dt>faReadOnly</dt>
<dd>
The file is read-only
</dd>
<dt>faHidden</dt>
<dd>
The file is hidden (On UNIX, the filename starts with a dot)
</dd>
<dt>faSysFile</dt>
<dd>
The file is a system file (On UNIX, the file is a character, block or FIFO file).
</dd>
<dt>faVolumeId</dt>
<dd>
Volume Label (For DOS/Windows on a plain FAT - not VFAT or Fat32)
</dd>
<dt>faDirectory</dt>
<dd>
File is a directory
</dd>
<dt>faArchive</dt>
<dd>
File is ready to be archived (Not possible on UNIX)
</dd>
</dl>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileGetAttrUTF8.Result">
<short>File attribute value for the specified file name</short>
</element>
<!-- argument Visibility: default -->
<element name="FileGetAttrUTF8.FileName">
<short>File name for the function</short>
</element>
<!-- function Visibility: default -->
<element name="FileSetAttrUTF8">
<short>
Sets the file attribute value for the specified file name
</short>
<descr>
<p>
FileSetAttrUTF8 is a Longint function used to set the file attributes for the specified file name to the value in Attr. The value in Attr can be set by AND-ing pre-defined file attribute constants, such as:
</p>
<dl>
<dt>faReadOnly</dt>
<dd>
The file is read-only
</dd>
<dt>faHidden</dt>
<dd>
The file is hidden (On UNIX, the filename starts with a dot)
</dd>
<dt>faSysFile</dt>
<dd>
The file is a system file (On UNIX, the file is a character, block or FIFO file).
</dd>
<dt>faVolumeId</dt>
<dd>
Volume Label (For DOS/Windows on a plain FAT - not VFAT or Fat32)
</dd>
<dt>faDirectory</dt>
<dd>
File is a directory
</dd>
<dt>faArchive</dt>
<dd>
File is ready to be archived (Not possible on UNIX)
</dd>
</dl>
<p>
For UNIX-like environments, FileSetAttr in SysUtils is called to set the file attributes value. InvalidateFileStateCache is also called for the specified file name. For the Windows environment, SetFileAttributesW in Windows is called to set the attributes value for the specified file name.
</p>
<p>
The return value contains the result from GetLastError; a non-zero value indicates that an error has occurred.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileSetAttrUTF8.Result">
<short>Last error number from the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSetAttrUTF8.Filename">
<short>File name to update in the function</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSetAttrUTF8.Attr">
<short>File attribute value for the specified file name</short>
</element>
<!-- function Visibility: default -->
<element name="DeleteFileUTF8">
<short>
Deletes the specified file name
</short>
<descr>
<p>
DeleteFileUTF8 is a Boolean function used to delete the specified file name.
</p>
<p>
For the Windows environment, DeleteFileW in Windows is called to remove the specified file name. For UNIX-like enviroments, DeleteFile in SysUtils is called to delete the specified file name. InvalidateFileStateCache is also called.
</p>
<p>
The return value contaIns True when Filename is successfully deleted from the local file system.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="DeleteFileUTF8.Result">
<short>True if the specified file name is deleted</short>
</element>
<!-- argument Visibility: default -->
<element name="DeleteFileUTF8.FileName">
<short>File name to delete in the function</short>
</element>
<!-- function Visibility: default -->
<element name="RenameFileUTF8">
<short>
Renames a file to the specified value
</short>
<descr>
<p>
RenameFileUTF8 is a Boolean function used to rename a file to the specified new value.
</p>
<p>
For the Windows enviroment, MoveFileW is called to rename the file using the values specified in OldName and NewName. For UNIX-like enviroments, RenameFIle in SysUtils is called to rename the file to the specified new value. InvalidateFileStateCache is also called.
</p>
<p>
The return value is True if the file is renamed successfully.
</p>
</descr>
<errors></errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="RenameFileUTF8.Result">
<short>True if the file is successfully renamed to the new value</short>
</element>
<!-- argument Visibility: default -->
<element name="RenameFileUTF8.OldName">
<short>Existing name for the file</short>
</element>
<!-- argument Visibility: default -->
<element name="RenameFileUTF8.NewName">
<short>New name for the file</short>
</element>
<!-- function Visibility: default -->
<element name="FileSearchUTF8">
<short>
Searches for a file with the specified name in the list of directory paths
</short>
<descr>
<p>
FileSearchUTF8 is a String function used to search for files with the specified name in the list of directory paths.
</p>
<p>
DirList is a list of file paths to search in the function. Values in DirList are separated by the PathSeparator character for the environment. No additional directories are searched when DirList contains an empty string ('').
</p>
<p>
ImplicitCurrentDir controls whether the search is implicitly limited to the current directory. The default value for ImplicitCurrentDir is True. When a file with the specified Name is located in the current directory, no additional searches are needed. The return value is the name of the file without any path information.
</p>
<p>
When ImplicitCurrentDir is False, each path in DirList is searched for a file with the specified name. The search is stopped when the first file with the specified file name is found. The return value contains the path in DirList where the file name was located along with the file name, or an empty string ('') if the specified file is not found.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileSearchUTF8.Result">
<short>Path and file name for the matching file, or an empty string</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSearchUTF8.Name">
<short>File name to locate in the list of directory paths</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSearchUTF8.DirList">
<short>The delimited list of directory paths to search</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsReadOnlyUTF8">
<short>
Determines if the specified file is marked as read-only
</short>
<descr>
<p>
FileIsReadOnlyUTF8 is a Boolean function used to determine if the specified file is marked as read-only in the local file system. FileIsReadOnlyUTF8 calls FileGetAttrUTF8 for the specified file name and checks to see if faReadOnly has been included in the file attributes value. The return value is True when faReadOnly has been included.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="FileIsReadOnlyUTF8.Result">
<short>True when the file is marked as read-only</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsReadOnlyUTF8.FileName">
<short>File name to examine in the function</short>
</element>
<!-- function Visibility: default -->
<element name="GetCurrentDirUTF8">
<short>
Gets the name for the current directory
</short>
<descr>
<p>
GetCurrentDirUTF8 is a String function used to get the name for the current directory in the local file system.
</p>
For the Windows environment, GetCurrentDirectoryW is called to get the current directory name. UTF8Encode is called to convert the WideString value to UTF-8, and used as the return value for the function.
<p>
</p>
<p>
For UNIX-like enviroments, GetCurrentDir in SysUtils is called to get the current directory name.
</p>
</descr>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="GetCurrentDirUTF8.Result">
<short>Name for the current directory</short>
</element>
<!-- function Visibility: default -->
<element name="SetCurrentDirUTF8">
<short>
Sets the current directory to the specified name
</short>
<descr>
<p>
SetCurrentDirUTF8 is a Boolean function used to set the current directory in the local file system to the specified value.
</p>
<p>
For the Windows environment, UTFDecode is called to convert NewDir and passed to SetCurrentDirectoryW to set the current directory name. Windows CE raises an exception in SetCurrentDirUtf8; the concept of a current directory does not exist in Windows CE.
</p>
<p>
For UNIX-like enviroments, SetCurrentDir in SysUtils is used to set the current directory to the specified value.
</p>
<p>
The return value is True if the current directory is successfully changed to the new value.
</p>
</descr>
<errors>
<dl>
<dt>TException</dt>
<dd>
Raised for the Windows CE environment; exception message is: '[SetCurrentDirWide] The concept of the current directory doesn''t exist in Windows CE'
</dd>
</dl>
</errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="SetCurrentDirUTF8.Result">
<short>True if the current directory was successfully changed to the new value</short>
</element>
<!-- argument Visibility: default -->
<element name="SetCurrentDirUTF8.NewDir">
<short>Directory name to use as the current directory</short>
</element>
<!-- function Visibility: default -->
<element name="CreateDirUTF8">
<short>
Creates a new directory with the specified name
</short>
<descr>
<p>
CreateDirUTF8 is a Boolean function used to create a new directory in the local file system with the specified name. For the Windows enviroment, the value in NewDir is converted to wide string format and passed to the CreateDirectoryW function in the Windows unit. For UNIX-like enviroments, CreateDir in SysUtils is used to create the new directory with the specified name.
</p>
<p>
The return value is True if the new directory is successfully created.
</p>
</descr>
<errors>
<p>
An error can occur if a directory with the specified name already exists in the local file system.
</p>
</errors>
<seealso></seealso>
</element>
<!-- function result Visibility: default -->
<element name="CreateDirUTF8.Result">
<short>True if the new directory is successfully created</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateDirUTF8.NewDir">
<short>Name for the new directory</short>
</element>
<!-- function Visibility: default -->
<element name="RemoveDirUTF8">
<short>
Removes the directory with the specified name
</short>
<descr>
<p>
RemoveDirUTF8 is a Boolean function used to remove the directory with the specified name from the local file system.
</p>
<p>
For the Windows environment, UTF8Decode is called to convert the value in Dir to wide string format. The RemoveDirectoryW function in the Windows unit is called to remove the specified directory.
</p>
<p>
For UNIX-like environments, RemoveDir in SysUtils is called to remove the specified directory.
</p>
<p>
The return value is True when the specified directory is successfully removed.
</p>
</descr>
<errors></errors>
<seealso>
<link id="#rtl.SysUtils.RemoveDir"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="RemoveDirUTF8.Result">
<short>True when the directory is successfully removed</short>
</element>
<!-- argument Visibility: default -->
<element name="RemoveDirUTF8.Dir">
<short>Name of the directory to remove in the function</short>
</element>
<!-- function Visibility: default -->
<element name="ForceDirectoriesUTF8">
<short>
Creates the specified directories if they do not already exist
</short>
<descr>
<p>
<var>ForceDirectories</var> is a Boolean function which creates the specified directories if they do not already exist. ForceDirectories examines the value in Dir to determine if it contains a Windows device identifier or a UNC name. If a device identifer or UNC name is found, but not supported on the platform, no actions are perfomed in the function.
</p>
<p>
ForceDirectories raises an EInOutError exception with the message in SCannotCreateEmptyDir when Dir contains an empty string ('').
</p>
<p>
Each directory in the specified path is checked using DirectoryExistsUTF8. ForceDirectories calls CreateDirUTF8 if a directory does not exist, and may exit with a return value of False if directory creation is not successful. The return value is True if all directories in the path information already exist, or are successfully created in the function.
</p>
</descr>
<errors>
<dl>
<dt>EIOnOutError</dt>
<dd>
Raised when the directory name is an empty string (''); Message is SCannotCreateEmptyDir, and ErrorCode is set to 3.
</dd>
</dl>
</errors>
<seealso>
<link id="ForceDirectory"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="ForceDirectoriesUTF8.Result">
<short>
True when directories exist or are successfully created in the function
</short>
</element>
<!-- argument Visibility: default -->
<element name="ForceDirectoriesUTF8.Dir">
<short>Path information to examine the function</short>
</element>
<!-- procedure type Visibility: default -->
<element name="TInvalidateFileStateCacheEvent">
<short>
Specifies the event signalled for an invalid file state in the file cache
</short>
<descr>
<p>
TInvalidateFileStateCacheEvent is a type which specifies the event signalled for an invalid file state in the file cache. TInvalidateFileStateCacheEvent is the type used for the OnInvalidateFileStateCache event handler.
</p>
</descr>
<seealso></seealso>
</element>
<!-- argument Visibility: default -->
<element name="TInvalidateFileStateCacheEvent.Filename">
<short>File name for the eventg notification</short>
</element>
<!-- variable Visibility: default -->
<element name="OnInvalidateFileStateCache">
<short>
Implements the event handler for a file with an invalid file state
</short>
<descr>
<p>
OnInvalidateFileStateCache is a TInvalidateFileStateCacheEvent variable which implements the event handler signalled for a file with an invalid file state. OnInvalidateFileStateCache allows an application to respond to the event notification for a specific file. OnInvalidateFileStateCache is signalled when InvalidateFileStateCache is called by routines that perform file manipulation.
</p>
<p>
OnInvalidateFileStateCache is significant for UNIX-like environments only, such as Linux and Amiga. OnInvalidateFileStateCache is not used in Windows environments.
</p>
</descr>
<seealso></seealso>
</element>
<!-- procedure Visibility: default -->
<element name="InvalidateFileStateCache">
<short>
Signals the OnInvalidateFileStateCache event handler
</short>
<descr>
<p>
InvalidateFileStateCache is a procedure used to signal the OnInvalidateFileStateCache event handler for the specified file name. InvalidateFileStateCache is used when an invalid file state is detected in routines which perform file manipulation, such as:
</p>
<ul>
<li>DeleteFileUTF8</li>
<li>FileSetAttrUTF8</li>
<li>FileSetDateUTF8</li>
<li>RenameFileUTF8</li>
</ul>
<p>
InvalidateFileStateCache is significant for UNIX-like environments only, such as Linux and Amiga. InvalidateFileStateCache is not used in Windows environments.
</p>
</descr>
<seealso></seealso>
</element>
<!-- argument Visibility: default -->
<element name="InvalidateFileStateCache.Filename">
<short></short>
</element>
<element name="SplitCmdLineParams">
<short>
Splits command line parameters separated by whitespace characters
</short>
<descr>
<p>
Parameters are separated by one or more whitespace characters (#9,#10,#13,#32). Quoted values are parsed as a single parameter. If ReadBackslash contains True, then <var>\"</var> is replaced with <var>"</var> and not treated as a quoted value. #0 (Decimal 0) is always treated as the end of the Parameters value.
</p>
</descr>
</element>
<element name="ReadAllLinks">
<short>
Resolves a symbolic link to an actual file name
</short>
<descr>
<p>
Resolves a symbolic link to an actual file name. It does not resolve symlinks in parent directories. If a symlink can not be resolved and if ExceptionOnError is False, the function returns an empty string (''). If ExceptionOnError is True, it raises an EFOpenError with a message, containing more details. On Windows it simply returns Filename.
</p>
</descr>
</element>
<element name="GetUnixPhysicalFilename">
<short>
Resolves all symlinks in Filename, including all directories
</short>
<descr>
<p>
If a symlink can not be resolved, and ExceptionOnError is False, the function returns the empty string (''). If ExceptionOnError is True, it raises an EFOpenError with a message containing more details.
</p>
</descr>
</element>
<element name="TryReadAllLinks">
<short>
Resolves a symlink to the real file
</short>
<descr>
<p>
If a symlink can not be resolved it returns Filename. It uses ReadAllLinks.
</p>
</descr>
</element>
<element name="ResolveDots">
<short>
Removes duplicate path delimiters and resolves . and ..
</short>
<descr>
<p>
This function shortens duplicate path delimiters to single path delimiters. It resolves 'A/../B' to 'B', which might be wrong under Unix if A is a symlink. The functions does not check the file system. The single dot './A' is resolved to 'A', but a single '.' is retained.
</p>
</descr>
</element>
<element name="SHGetFolderPathUTF8">
<short>
Works like the WinAPI function SHGetFolderPathW, but returns an UTF-8-encoded string
</short>
</element>
</module>
<!-- LazFileUtils -->
</package>
</fpdoc-descriptions>
|