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
|
<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="lazutils">
<!--
====================================================================
FileUtil
====================================================================
-->
<module name="FileUtil">
<short>Miscellaneous procedures and functions for manipulating files and filenames</short>
<descr/>
<!-- unresolved type reference Visibility: default -->
<element name="Classes">
<short/>
<descr/>
<seealso/>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
<short/>
<descr/>
<seealso/>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="LCLStrConsts">
<short/>
<descr/>
<seealso/>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="Masks">
<short/>
<descr/>
<seealso/>
</element>
<!-- constant Visibility: default -->
<element name="UTF8FileHeader">
<short/>
<descr/>
<seealso/>
</element>
<!-- function Visibility: default -->
<element name="CompareFilenames">
<short>
<var>CompareFileNames</var> - compares two file names to see whether they are equal</short>
</element>
<!-- function result Visibility: default -->
<element name="CompareFilenames.Result">
<short>Returns zero if files are equal, or the index of differences, or the difference in length if filenames are not equal</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Filename1">
<short>First filename</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Filename2">
<short>Second filename</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.ResolveLinks">
<short>
<var>ResolveLinks</var> - if True, searches through links to find the actual file for comparison</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Len1">
<short>Length of first filename</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFilenames.Len2">
<short>Length of second filename</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsAbsolute">
<short>Checks whether an absolute file name is given in <var>TheFileName</var>
</short>
<descr>
<p>Checks whether an absolute file name is given in <var>TheFileName</var>
</p>
<p>Makes use of <var>FilenameIsWinAbsolute</var> on Windows systems, otherwise uses <var>FilenameIsUnixAbsolute</var>
</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsAbsolute.Result">
<short>Returns True if an absolute filename has been supplied</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsAbsolute.TheFilename">
<short>The name of the file to be checked</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsWinAbsolute">
<short>
<var>FilenameIsWinAbsolute</var> - checks that the supplied name is an absolute file name for the Windows system</short>
<descr>
<p>
<var>FilenameIsWinAbsolute</var> - checks that the supplied name is an absolute file name for the Windows system</p>
<p>Looks, for instance, for Drive Letters and colon at the beginning of the string</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsWinAbsolute.Result">
<short>Returns True if this is a true absolite Windows filename</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsWinAbsolute.TheFilename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsUnixAbsolute">
<short>
<var>FilenameIsUnixAbsolute</var> - checks that the supplied name is an absolute filename in Unix systems</short>
<descr>
<p>
<var>FilenameIsUnixAbsolute</var> - checks that the supplied name is an absolute filename in Unix systems</p>
<p>Checks that the name is non-empty and starts with a slash</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsUnixAbsolute.Result">
<short>Returns True if the supplied name is a correct Absolute file name for a Unix system</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsUnixAbsolute.TheFilename">
<short>The name of the file for checking</short>
</element>
<!-- procedure Visibility: default -->
<element name="CheckIfFileIsExecutable">
<short>
<var>CheckIfFileIsExecutable</var> - creates Exception if file is not Executable</short>
<descr>
<p>
<var>CheckIfFileIsExecutable</var> - creates Exception if file is not Executable</p>
<p>Otherwise, there is no action</p>
</descr>
<errors>An exception is raised if the file is not executable</errors>
</element>
<!-- argument Visibility: default -->
<element name="CheckIfFileIsExecutable.AFilename">
<short>
<var>AFileName</var> - name of the file for checking</short>
</element>
<!-- procedure Visibility: default -->
<element name="CheckIfFileIsSymlink">
<short>
<var>CheckIfFileIsSymlink</var> - raises an exception if file is not a Symbolic Link</short>
<descr>
<p>
<var>CheckIfFileIsSymlink</var> - raises an exception if file is not a Symbolic Link</p>
<p>Otherwise no action</p>
</descr>
<errors>An exception is raised with appropriate message if file does not exist or is not a correct symbolic link (eg dangling link, circular link, read access denied, or not a symbolic link)</errors>
</element>
<!-- argument Visibility: default -->
<element name="CheckIfFileIsSymlink.AFilename">
<short>
<var>AFileName</var> - name of file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsReadable">
<short>
<var>FileIsReadable</var> - checks whether supplied file name refers to a readable file</short>
<descr>
<p>
<var>FileIsReadable</var> - checks whether supplied file name refers to a readable file</p>
<p>Always true on Windows systems.</p>
<p>On Unix systems, checks permissions of file</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsReadable.Result">
<short>Always true in Windows; in Unix systems, returns true if read permission exists for the file</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsReadable.AFilename">
<short>Name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsWritable">
<short>
<var>FileIsWritable</var> - checks if the supplied file name refers to a file that is writable</short>
<descr>
<p>
<var>FileIsWritable</var> - checks if the supplied file name refers to a file that is writable</p>
<p>Checks file permissions in both Unix and Windows systems</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsWritable.Result">
<short>Returns True if Write permission exists</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsWritable.AFilename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsText">
<short>
<var>FileIsText</var> - checks whether the supplied file name refers to a readable text file</short>
<descr>
<p>
<var>FileIsText</var> - checks whether the supplied file name refers to a readable text file</p>
<p>Searches the opening section of the file (first 1024 characters) for non-text characters such as ASCII 0 to 31 (except CR and LF, the new line characters)</p>
</descr>
<errors>If there is a file reading error, an Exception is raised and <var>FileReadable</var> returns False</errors>
</element>
<!-- function result Visibility: default -->
<element name="FileIsText.Result">
<short>Returns True if the file is a text file</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsText.AFilename">
<short>The name of the file for checking</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsText.FileReadable">
<short>Returns false if a file reading Exception is encountered</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsExecutable">
<short>
<var>FileIsExecutable</var> - checks if
<var>AFileName</var> refers to an executable file</short>
<descr>
<p>
<var>FileIsExecutable</var> - checks if
<var>AFileName</var> refers to an executable file</p>
<p>On Windows systems, if the file exists it is regarded as executable.</p>
<p>On other systems (eg Unix etc), looks at file permissions to see whether execute flag is set</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsExecutable.Result">
<short>Returns True if file is executable (always true in Windows if file exists)</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsExecutable.AFilename">
<short>Name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsSymlink">
<short>
<var>FileIsSymLink</var> - check if file name is a symbolic link</short>
<descr>
<p>
<var>FileIsSymLink</var> - check if file name is a symbolic link</p>
<p>On Windows systems, symbolic links are supported only on NT based Windows, the function returns false on Win9x and WinCE systems. On others, returns true if it is a symbolic link</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsSymlink.Result">
<short>Returns True if file name is a symbolic link (always false in Win9x and WinCE systems)</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsSymlink.AFilename">
<short>Name of the file for checking</short>
</element>
<element name="FileIsHardLink">
<short>
<var>FileIsHardLink</var> - check if file name is a hard link</short>
<descr>
<p>
<var>FileIsHardLink</var> - check if file name is a hard link</p>
<p>On Windows systems, hard links are supported only on NT based Windows, the function returns false on Win9x and WinCE systems. On others, returns true if the hard link reference count is bigger than one</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsHardLink.Result">
<short>Returns True if file name is a hard link (always false in Win9x and WinCE systems)</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsHardLink.AFilename">
<short>Name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FileSize">
<short>
<var>FileSize</var> - finds the size of the named file</short>
</element>
<!-- function result Visibility: default -->
<element name="FileSize.Result">
<short>Returns the size of the file, or -1 if not there</short>
</element>
<!-- argument Visibility: default -->
<element name="FileSize.Filename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="GetFileDescription">
<short>
<var>GetFileDescription</var> - finds the Unix-type file description for the given file</short>
<descr>
<p>
<var>GetFileDescription</var> - finds the Unix-type file description for the given file</p>
<p>No action in Windows systems (returns empty string)</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="GetFileDescription.Result">
<short>Returns empty string (Windows) or Unix-type file description string in other systems</short>
</element>
<!-- argument Visibility: default -->
<element name="GetFileDescription.AFilename">
<short>The name of the file whose description is sought</short>
</element>
<!-- function Visibility: default -->
<element name="ReadAllLinks">
<short>
<var>ReadAllLinks</var> - tries to find the file that is referred to by the symbolic link in
<var>FileName</var>
</short>
<descr>
<p>
<var>ReadAllLinks</var> - tries to find the file that is referred to by the symbolic link in
<var>FileName</var>
</p>
<p>
<var>No function in Windows systems</var>
</p>
<p>
<var>On Unix-like systems, finds the linked file and returns its full path and filename, or (if <var>ExceptionOnError</var> has been set True) an Exception is raised with appropriate error message</var>
</p>
</descr>
<errors>If an error is encountered on trying to read the link, provided <var>ExceptionOnError</var> has been set True an Exception is raised with appropriate error message. Otherwise an error results in the return of an empty string.</errors>
</element>
<!-- function result Visibility: default -->
<element name="ReadAllLinks.Result">
<short>Returns the full path and filename of the target file; empty if the file is not found, or the original <var>FileName</var> on Windows systems</short>
</element>
<!-- argument Visibility: default -->
<element name="ReadAllLinks.Filename">
<short>The string containing the symbolic link</short>
</element>
<!-- argument Visibility: default -->
<element name="ReadAllLinks.ExceptionOnError">
<short>If True, an Exception is raised on encountering a file error</short>
</element>
<!-- function Visibility: default -->
<element name="DirPathExists">
<short>Checks if the given directory path exists</short>
</element>
<!-- function result Visibility: default -->
<element name="DirPathExists.Result">
<short>Returns True if the given directory path exists</short>
</element>
<!-- argument Visibility: default -->
<element name="DirPathExists.FileName">
<short>Name of the directory path to be checked</short>
</element>
<!-- function Visibility: default -->
<element name="ForceDirectory">
<short>
<var>ForceDirectory </var>- creates a directory if none exists</short>
</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>The name of the directory required</short>
</element>
<!-- function Visibility: default -->
<element name="DeleteDirectory">
<short>
<var>DeleteDirectory</var> - Delete the named directory (or only its contents if
<var>OnlyChildren</var> is True)</short>
<errors>If there was an error, such as trying to removing . or .., or there were insufficient permissions, or the file did not exist, False is returned</errors>
</element>
<!-- function result Visibility: default -->
<element name="DeleteDirectory.Result">
<short>Returns True if the directory or its contents were correctly removed</short>
</element>
<!-- argument Visibility: default -->
<element name="DeleteDirectory.DirectoryName">
<short>The name of the directory for processing</short>
</element>
<!-- argument Visibility: default -->
<element name="DeleteDirectory.OnlyChildren">
<short>If True, only the contents ('children') of the directory are removed</short>
</element>
<!-- function Visibility: default -->
<element name="ProgramDirectory">
<short>
<var>ProgramDirectory</var> - returns the directory in which the currently running program resides</short>
</element>
<!-- function result Visibility: default -->
<element name="ProgramDirectory.Result">
<short>Returns the name of the directory in which the current program is found</short>
</element>
<!-- function Visibility: default -->
<element name="DirectoryIsWritable">
<short>
<var>DirectoryIsWritable</var> - checks if it is possible to write a file to the named directory</short>
<descr>
<p>
<var>DirectoryIsWritable</var> - checks if it is possible to write a file to the named directory</p>
<p>Tries to create a text file within the named directory, and write to it. Returns True if it works, and False if it doesn't. Also raises an Exception on failure</p>
</descr>
<errors>An Exception is raised on failure to create or write to the temporary file</errors>
</element>
<!-- function result Visibility: default -->
<element name="DirectoryIsWritable.Result">
<short>Returns True if successful in writing a temporary file to the named directory</short>
</element>
<!-- argument Visibility: default -->
<element name="DirectoryIsWritable.DirectoryName">
<short>Name of the Directory for checking</short>
</element>
<!-- constant Visibility: default -->
<element name="PascalFileExt">
<short>
<var>PascalFileExt</var> - typically '.pas', '.pp' or '.p'</short>
</element>
<!-- function Visibility: default -->
<element name="ExtractFileNameOnly">
<short>
<var>ExtractFileNameOnly</var> - removes all path delimiters and file extensions, leaving just the file name</short>
</element>
<!-- function result Visibility: default -->
<element name="ExtractFileNameOnly.Result">
<short>Returns the original file name with path delimiters and the extension removed</short>
</element>
<!-- argument Visibility: default -->
<element name="ExtractFileNameOnly.AFilename">
<short>The name of the file for processing</short>
</element>
<!-- function Visibility: default -->
<element name="ExtractFileNameWithoutExt">
<short>
<var>ExtractFileNameWithoutExt</var> - returns just the name of the file without an extension</short>
</element>
<!-- function result Visibility: default -->
<element name="ExtractFileNameWithoutExt.Result">
<short>Returns the original file name if it had no extension, otherwise returns the file name with its extension removed</short>
</element>
<!-- argument Visibility: default -->
<element name="ExtractFileNameWithoutExt.AFilename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="CompareFileExt">
<short>
<var>CompareFileExt</var> - see whether the nominated file has an extension that is the same as the supplied extension</short>
</element>
<!-- function result Visibility: default -->
<element name="CompareFileExt.Result">
<short>Returns zero if extension is present in file name, otherwise returns non-zero value</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.Filename">
<short>The <var>FileName</var> whose extension is to be checked</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.Ext">
<short>
<var>Ext</var> - string defining the Extension to be checked</short>
</element>
<!-- argument Visibility: default -->
<element name="CompareFileExt.CaseSensitive">
<short>
<var>CaseSensitive</var> - if True, case of
<var>Ext</var> must match case in
<var>FileName</var>
</short>
</element>
<!-- function Visibility: default -->
<element name="FilenameIsPascalUnit">
<short>
<var>FilenameIsPascalUnit</var> - checks that the supplied name is a correct Pascal unit name</short>
<descr>
<p>
<var>FilenameIsPascalUnit</var> - checks that the supplied name is a correct Pascal unit name</p>
<p>Looks at the file extension to see if it matches one of the standard Pascal extensions (currently .p, .pp, .pas)</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FilenameIsPascalUnit.Result">
<short>Returns True if the supplied name is a correct Pascal Unit filename</short>
</element>
<!-- argument Visibility: default -->
<element name="FilenameIsPascalUnit.Filename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="AppendPathDelim">
<short>Appends the path delimeter to the path.</short>
<descr>AppendPathDelim checks if the last character in the path is the path delimeter. If it isn't the path delimeter, it is added, otherwise the unmodified path is returned.
</descr>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="AppendPathDelim.Result">
<short>Returns a new path name including delimiter, if it was not already there, otherwise returns original pathname</short>
</element>
<!-- argument Visibility: default -->
<element name="AppendPathDelim.Path">
<short>Path - name for checking</short>
</element>
<!-- function Visibility: default -->
<element name="ChompPathDelim">
<short>Removes trailing path delimeter</short>
<descr>ChompPathDelim checks if the last character in the path is the path delimeter. If it is the path delimeter, it is removed, otherwise the unmodified path is returned.</descr>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="ChompPathDelim.Result">
<short>Returns new path name with delimiter removed if it was there, otherwise returns original path name</short>
</element>
<!-- argument Visibility: default -->
<element name="ChompPathDelim.Path">
<short>Path name for checking</short>
</element>
<!-- function Visibility: default -->
<element name="TrimFilename">
<short>
<var>TrimFilename</var> - trim double path delimiters, heading and trailing spaces and special dirs . and ..</short>
</element>
<!-- function result Visibility: default -->
<element name="TrimFilename.Result">
<short>Returns the original file name if no trimming was needed, otherwise returns the trimmed file name</short>
</element>
<!-- argument Visibility: default -->
<element name="TrimFilename.AFilename">
<short>The name of the file for trimming</short>
</element>
<!-- function Visibility: default -->
<element name="CleanAndExpandFilename">
<short>
<var>CleanAndExpandFilename</var> - trims irrelevant characters such as path delimiters from the name of the file</short>
</element>
<!-- function result Visibility: default -->
<element name="CleanAndExpandFilename.Result">
<short>Returns the original file name without redundant leading or trailing spaces, path delimiters etc</short>
</element>
<!-- argument Visibility: default -->
<element name="CleanAndExpandFilename.Filename">
<short>The name of the file for processing</short>
</element>
<!-- function Visibility: default -->
<element name="CleanAndExpandDirectory">
<short>
<var>CleanAndExpandDirectory</var> - trims and cleans
<var>FileName</var> and appends a directory delimiter to it</short>
</element>
<!-- function result Visibility: default -->
<element name="CleanAndExpandDirectory.Result">
<short>Returns the cleaned file name with appended directory delimiter</short>
</element>
<!-- argument Visibility: default -->
<element name="CleanAndExpandDirectory.Filename">
<short>The name of the file for operation</short>
</element>
<!-- function Visibility: default -->
<element name="CreateAbsoluteSearchPath">
<short>
<var>CreateAbsoluteSearchPath</var> - concatenates
<var>BaseDirectory </var>and
<var>SearchPath</var> to form an absolute path to search for files</short>
<descr>
<p>
<var>CreateAbsoluteSearchPath</var> - concatenates
<var>BaseDirectory </var>and
<var>SearchPath</var> to form an absolute path to search for files</p>
<p>Adds appropriate path delimiters to the BaseDirectory string, then adds the search path, checking that each directory in the path is in fact an absolutely specified directory, then returns the fully formed absolute search path.</p>
</descr>
<errors>If
<var>BaseDirectory</var> is empty, functions exits and returns with
<var>Result</var> equal to
<var>SearchPath</var>; if
<var>SearchPath</var> is empty, function exits with empty
<var>Result</var>
</errors>
</element>
<!-- function result Visibility: default -->
<element name="CreateAbsoluteSearchPath.Result">
<short>The absolute path formed by concatenating <var>BaseDirectory</var> and <var>SearchPath</var>
</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateAbsoluteSearchPath.SearchPath">
<short>The search path (a relative path)</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateAbsoluteSearchPath.BaseDirectory">
<short>The base directory from which to form the absolute path</short>
</element>
<!-- function Visibility: default -->
<element name="CreateRelativePath">
<short>
<var>CreateRelativePath</var> - given an absolute file path and a<var>BaseDirectory,</var> create a file path relative to the given base directory</short>
<descr>
<p>
<var>CreateRelativePath</var> - given an absolute path and a <var>BaseDirectory,</var> create a file path relative to the given base directory</p>
<p>The returned string includes the correct number of dots and double dots to signify relativity to the current directory (eg ../../or ..\..\ etc). The inverse operation is to create an absolute file path:
</p>
<code>RelPath:=CreateRelativePath(AbsPath,BaseDir);
if FilenameIsAbsolute(RelPath) then
NewAbsPath:=RelPath
else
NewAbsPath:=AppendPathDelim(BaseDir)+RelPath;</code>
</descr>
<errors>If <var>BaseDirectory</var> is empty, functions exits and returns with <var>Result</var> equal to <var>Filename</var>; if <var>Filename</var> is empty, function exits with empty <var>Result</var>
</errors>
</element>
<!-- function result Visibility: default -->
<element name="CreateRelativePath.Result">
<short>The file name expressed as path relative to the current directory</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateRelativePath.Filename">
<short>The absolute <var>FileName</var> for which a relative path is to be created</short>
</element>
<!-- argument Visibility: default -->
<element name="CreateRelativePath.BaseDirectory">
<short>
<var>BaseDirectory </var>of the absolute search path</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsInPath">
<short>
<var>FileIsInPath</var> - checks that
<var>FileName</var> refers to a file that exists within the given
<var>Path</var>
</short>
</element>
<!-- function result Visibility: default -->
<element name="FileIsInPath.Result">
<short>Returns True if a file named <var>Filename</var> exists within the given <var>Path</var>
</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInPath.Filename">
<short>The name of the file for checking</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInPath.Path">
<short>The <var>Path</var> to be searched</short>
</element>
<!-- function Visibility: default -->
<element name="FileIsInDirectory">
<short>
<var>FileIsInDirectory</var> - checks whether a file with
<var>FileName</var> exists within the given
<var>Directory</var>
</short>
<descr>
<p>
<var>FileIsInDirectory</var> - checks whether a file with
<var>FileName</var> exists within the given
<var>Directory</var>
</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FileIsInDirectory.Result">
<short>Returns True if the file is in the directory</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInDirectory.Filename">
<short>The name of the file to be checked</short>
</element>
<!-- argument Visibility: default -->
<element name="FileIsInDirectory.Directory">
<short>The name of the directory to be searched for the file</short>
</element>
<!-- enumeration type Visibility: default -->
<element name="TSearchFileInPathFlag">
<short/>
<descr/>
<seealso/>
</element>
<!-- enumeration value Visibility: default -->
<element name="TSearchFileInPathFlag.sffDontSearchInBasePath">
<short/>
</element>
<!-- enumeration value Visibility: default -->
<element name="TSearchFileInPathFlag.sffSearchLoUpCase">
<short/>
</element>
<!-- set type Visibility: default -->
<element name="TSearchFileInPathFlags">
<short/>
<descr/>
<seealso/>
</element>
<!-- constant Visibility: default -->
<element name="AllDirectoryEntriesMask">
<short>
<var>AllDirectoryEntriesMask</var> - typically '*' on most systems</short>
</element>
<!-- function Visibility: default -->
<element name="GetAllFilesMask">
<short>File mask representing all files suitable for showing in a file filter.</short>
<descr>GetAllFilesMask returns a File Mask suitable for showing in a filter of a Open File Dialog.
windows '*.*' is returned, on other operating systems just '*'.</descr>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="GetAllFilesMask.Result">
<short/>
</element>
<!-- function Visibility: default -->
<element name="GetExeExt">
<short>
<var>GetExeExt</var> - find the correct extension (including the starting .) for an executable file</short>
</element>
<!-- function result Visibility: default -->
<element name="GetExeExt.Result">
<short>Returns '.exe' in Windows, nothing in other systems.</short>
</element>
<!-- function Visibility: default -->
<element name="SearchFileInPath">
<short><var>SearchFileInPath</var> - searches for <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><printshort id="SearchFileInPath"/>
</p><p>Searches the whole path. Relative folder file names are expanded using BasePath. By default if BasePath is set it is searched as well, unless <var>sffDontSearchInBasePath</var> flag is present</p><p>Returns the first file that matches the supplied criteria</p>
</descr>
<errors>If the file does not exist, an empty string is returned</errors>
</element>
<!-- function result Visibility: default -->
<element name="SearchFileInPath.Result">
<short>Returns fully specified file name of the first file that matches the supplied criteria, or empty string if file not found</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchFileInPath.Filename">
<short>The name of the file for searching</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchFileInPath.BasePath">
<short>The <var>BasePath </var>to be used for the search</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchFileInPath.SearchPath">
<short>The path for searching</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchFileInPath.Delimiter">
<short>The directory <var>Delimiter</var> to be used in the search</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchFileInPath.Flags">
<short>
<var>Flags </var>specifying how to search: e.g. don't search in base path, case independent search</short>
</element>
<!-- function Visibility: default -->
<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>
<printshort id="SearchAllFilesInPath"/>
</p>
<p>Searches the whole path unless the <var>sffDontSearchInBasePath</var> flag is present</p>
<p>Returns all files that match the supplied criteria</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="SearchAllFilesInPath.Result">
<short>Returns fully specified file names of all files that match the supplied criteria, or empty string if file not found</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchAllFilesInPath.Filename">
<short>The name of the file for searching</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchAllFilesInPath.BasePath">
<short>The <var>BasePath </var>to be used for the search</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchAllFilesInPath.SearchPath">
<short>The path for searching</short>
</element>
<!-- argument Visibility: default -->
<element name="SearchAllFilesInPath.Delimiter">
<short>The directory <var>Delimiter</var> to be used in the search</short>
</element>
<!-- argument Visibility: default -->
<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>
<!-- function Visibility: default -->
<element name="FindDiskFilename">
<short>
<var>FindDiskFilename</var> - finds the file that best fits the supplied filename</short>
<descr>
<p>
<var>FindDiskFilename</var> - finds the file that best fits the supplied filename</p>
<p>Searches for the filename case on disk. The file must exist.</p>
<p>For example: If Filename='file' and there is only a 'File' then 'File' will be returned.</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="FindDiskFilename.Result">
<short>Returns the best fitting filename from the disk (taking case into consideration)</short>
</element>
<!-- argument Visibility: default -->
<element name="FindDiskFilename.Filename">
<short>The name of the file for checking</short>
</element>
<!-- function Visibility: default -->
<element name="FindDiskFileCaseInsensitive">
<short>
<var>FindDiskFileCaseInsensitive</var> - searches for the given
<var>FileName</var> in a case insensitive manner</short>
</element>
<!-- function result Visibility: default -->
<element name="FindDiskFileCaseInsensitive.Result">
<short>If it exists, returns the file name with path information otherwise returns an empty string</short>
</element>
<!-- argument Visibility: default -->
<element name="FindDiskFileCaseInsensitive.Filename">
<short>The name of the file for processing</short>
</element>
<!-- function Visibility: default -->
<element name="FindDefaultExecutablePath">
<short>
<var>FindDefaultExecutablePath</var> - finds the default path to the named Executable file</short>
<descr><p><var>FindDefaultExecutablePath</var> - finds the default path to the named Executable file</p><p>On Windows systems it looks for 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>
<!-- function result Visibility: default -->
<element name="FindDefaultExecutablePath.Result">
<short>Returns the filename of the Executable file with path information attached</short>
</element>
<!-- argument Visibility: default -->
<element name="FindDefaultExecutablePath.Executable">
<short>The name of the <var>Executable</var> file</short>
</element>
<!-- object Visibility: default -->
<element name="TFileIterator">
<short>Class for getting info about found file or directory.</short>
<descr/>
<errors/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileIterator.FPath">
<short/>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileIterator.FLevel">
<short/>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileIterator.FFileInfo">
<short/>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileIterator.FSearching">
<short/>
<descr/>
<seealso/>
</element>
<!-- function Visibility: private -->
<element name="TFileIterator.GetFileName">
<short/>
<descr/>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="TFileIterator.GetFileName.Result">
<short/>
</element>
<!-- procedure Visibility: public -->
<element name="TFileIterator.Stop">
<short>Stops the searching process.</short>
<descr/>
<errors/>
<seealso>
<link id="TFileSearcher.Search"/>
</seealso>
</element>
<!-- function Visibility: public -->
<element name="TFileIterator.IsDirectory">
<short>If the current file is directory.</short>
<descr/>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="TFileIterator.IsDirectory.Result">
<short/>
</element>
<!-- property Visibility: public -->
<element name="TFileIterator.FileName">
<short>Gets the current file name.</short>
<descr/>
<seealso/>
</element>
<!-- property Visibility: public -->
<element name="TFileIterator.FileInfo">
<short>Gets the current file info.</short>
<descr/>
<seealso/>
</element>
<!-- property Visibility: public -->
<element name="TFileIterator.Level">
<short>Gets the current file path level relative to base search path.</short>
<descr/>
<seealso/>
</element>
<!-- property Visibility: public -->
<element name="TFileIterator.Path">
<short>Gets the current file path.</short>
<descr/>
<seealso/>
</element>
<!-- property Visibility: public -->
<element name="TFileIterator.Searching">
<short>If the searching is in process.</short>
<descr/>
<seealso/>
</element>
<!-- procedure type Visibility: default -->
<element name="TFileFoundEvent">
<short/>
<descr/>
<seealso/>
</element>
<!-- argument Visibility: default -->
<element name="TFileFoundEvent.FileIterator">
<short/>
</element>
<!-- procedure type Visibility: default -->
<element name="TDirectoryFoundEvent">
<short/>
<descr/>
<seealso/>
</element>
<!-- argument Visibility: default -->
<element name="TDirectoryFoundEvent.FileIterator">
<short/>
</element>
<!-- object Visibility: default -->
<element name="TFileSearcher">
<short>Class for searching files.</short>
<descr/>
<errors/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileSearcher.FOnFileFound">
<short/>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: private -->
<element name="TFileSearcher.FOnDirectoryFound">
<short/>
<descr/>
<seealso/>
</element>
<!-- procedure Visibility: private -->
<element name="TFileSearcher.RaiseSearchingError">
<short/>
<descr/>
<errors/>
<seealso/>
</element>
<!-- procedure Visibility: protected -->
<element name="TFileSearcher.DoDirectoryEnter">
<short/>
<descr/>
<errors/>
<seealso/>
</element>
<!-- procedure Visibility: protected -->
<element name="TFileSearcher.DoDirectoryFound">
<short/>
<descr/>
<errors/>
<seealso/>
</element>
<!-- procedure Visibility: protected -->
<element name="TFileSearcher.DoFileFound">
<short/>
<descr/>
<errors/>
<seealso/>
</element>
<!-- constructor Visibility: public -->
<element name="TFileSearcher.Create">
<short>Creates new file searcher object.</short>
<descr/>
<errors/>
<seealso/>
</element>
<!-- procedure Visibility: public -->
<element name="TFileSearcher.Search">
<short>Searches for files in specified path with passed options.</short>
<descr>Searches for files in specified path. When file is found the OnFileFound event is invoked, for directories
		 OnDirectoryFound event. You can abort searching process by calling Stop method in this events.
		</descr>
<errors/>
<seealso>
<link id="TFileSearcher.OnFileFound"/>
<link id="TFileSearcher.OnDirectoryFound"/>
<link id="TFileIterator.Stop"/>
</seealso>
</element>
<!-- argument Visibility: default -->
<element name="TFileSearcher.Search.ASearchPath">
<short>Base path for searching files.</short>
</element>
<!-- argument Visibility: default -->
<element name="TFileSearcher.Search.ASearchMask">
<short>Mask which file should match.</short>
</element>
<!-- argument Visibility: default -->
<element name="TFileSearcher.Search.ASearchSubDirs">
<short>If search recursively sub directories.</short>
</element>
<!-- property Visibility: public -->
<element name="TFileSearcher.OnDirectoryFound">
<short>Is invoked when directory is found.</short>
<descr/>
<seealso/>
</element>
<!-- property Visibility: public -->
<element name="TFileSearcher.OnFileFound">
<short>Is invoked when file is found.</short>
<descr/>
<seealso/>
</element>
<!-- function Visibility: default -->
<element name="FindAllFiles">
<short>Returns the list of found files in the specified path according to passed options.</short>
<descr/>
<errors/>
<seealso/>
</element>
<!-- function result Visibility: default -->
<element name="FindAllFiles.Result">
<short>List of found files.</short>
<descr>List (TStringList) of found files.
The StringList is instantiated by the FindAllFiles function, so you should not instatiate it before calling
the function.</descr>
</element>
<!-- argument Visibility: default -->
<element name="FindAllFiles.SearchPath">
<short>Base path for searching files.</short>
</element>
<!-- argument Visibility: default -->
<element name="FindAllFiles.SearchMask">
<short>A list of masks, separated by a semicolon (;) to which found files should match.</short>
<descr>A list of masks, separated by a semicolon (;) to which found files should match.
The mask can contain wildcards like * and ? and it also supports sets like [a-d,x].
See the Masks unit fo more details.</descr>
</element>
<!-- argument Visibility: default -->
<element name="FindAllFiles.SearchSubDirs">
<short>If search recursively sub directories.</short>
</element>
<!-- function Visibility: default -->
<element name="ReadFileToString">
<short>
<var>ReadFileToString</var> - returns a string with the contents of the named file</short>
<descr>
<p>
<printshort id="ReadFileToString"/>
</p>
<p>Opens the file and reads its contents into a Stream, then reads the stream to construct the
<var>Result</var> string</p>
</descr>
<errors>If there is an error in reading the file, an exception is raised and an empty string is returned</errors>
</element>
<!-- function result Visibility: default -->
<element name="ReadFileToString.Result">
<short>The contents of the file as a string, or an empty string if there is an error or the file is empty</short>
</element>
<!-- argument Visibility: default -->
<element name="ReadFileToString.Filename">
<short>The name of the file for processing</short>
</element>
<!-- function Visibility: default -->
<element name="CopyFile">
<short>
<var>CopyFile</var> - copies Source file to Destination file, optionally preserving the timestamp of the original file</short>
<errors>An exception is raised if the copy process does not complete successfully or correctly</errors>
</element>
<!-- function result Visibility: default -->
<element name="CopyFile.Result">
<short>Returns True if successful, False if there was an error</short>
</element>
<!-- argument Visibility: default -->
<element name="CopyFile.SrcFilename">
<short>The source filename for the Copy</short>
</element>
<!-- argument Visibility: default -->
<element name="CopyFile.DestFilename">
<short>The destination filename for the Copy</short>
</element>
<!-- argument Visibility: default -->
<element name="CopyFile.PreserveTime">
<short>If True, the timestamp of the original file is preserved in the copied file</short>
</element>
<!-- function Visibility: default -->
<element name="GetTempFilename">
<short>
<var>GetTempFilename</var> - finds a suitable name for a temporary file</short>
<descr>
<p>
<var>GetTempFilename</var> - finds a suitable name for a temporary file</p>
<p>
<var>Uses <var>Prefix</var> plus an integer to generate a file with extension '.tmp' in the specified <var>Directory</var>; if it already exists, increments the integer until it finds a name that is not already used</var>
</p>
</descr>
</element>
<!-- function result Visibility: default -->
<element name="GetTempFilename.Result">
<short>Returns the temporary file name that has been created</short>
</element>
<!-- argument Visibility: default -->
<element name="GetTempFilename.Directory">
<short>The <var>Directory</var> in which the temprary file is to be placed</short>
</element>
<!-- argument Visibility: default -->
<element name="GetTempFilename.Prefix">
<short>The <var>Prefix</var> to which an integer will be attached to generate a temporary filename</short>
</element>
</module>
<!-- FileUtil -->
</package>
</fpdoc-descriptions>
|