1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>KStandardDirs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
<link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
<div id="header_top">
<div>
<div>
<img alt ="" src="../common/top-kde.jpg"/>
KDE 4.7 PyKDE API Reference
</div>
</div>
</div>
<div id="header_bottom">
<div id="location">
<ul>
<li>KDE's Python API</li>
</ul>
</div>
<div id="menu">
<ul>
<li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
</div>
</div>
</div>
<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer"> </div>
<h1>KStandardDirs Class Reference</h1>
<code>from PyKDE4.kdecore import *</code>
<p>
<h2>Detailed Description</h2>
<p>Site-independent access to standard KDE directories.
<dl class="author" compact><dt><b>Author:</b></dt><dd> Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> </dd></dl>
</p>
<p>
This is one of the most central classes in kdelibs: It knows where KDE-related files
reside on the user's hard disk. It's meant to be the only one that knows --
so applications and the end user don't have to.
</p>
<p>
Applications should always refer to a file with a resource type.
The application should leave it up to e.g.
KStandardDirs.findResource("apps", "Home.desktop")
to return the desired path <tt>/opt/kde/share/applnk/Home.desktop</tt>
or .locate("data", "kgame/background.jpg") to return
<tt>/opt/kde/share/apps/kgame/background.jpg</tt>
</p>
<p>
There are several toplevel prefixes under which files can be located.
One of them is the kdelibs install location, one is the application
install location, and one is <tt>$KDEHOME</tt>.
Under these toplevel prefixes there are several well-defined suffixes
where specific resource types can be found.
For example, for the resource type "html" the suffixes could be
share/doc/HTML and share/doc/kde/HTML.
The search algorithm tries to locate the file under each prefix-suffix
combination.
</p>
<p>
It is also possible to register
absolute paths that KStandardDirs looks up after not finding anything
in the former steps. They can be useful if the user wants to provide
specific directories that aren't in his <tt>$KDEHOME</tt> directory, for
example for icons.
</p>
<p>
<b>Standard resources that kdelibs allocates are:</b>\n
</p>
<p>
<li> apps - Applications menu (.desktop files). </li>
<li> autostart - Autostart directories (both XDG and kde-specific) </li>
<li> cache - Cached information (e.g. favicons, web-pages) </li>
<li> cgi - CGIs to run from kdehelp. </li>
<li> config - Configuration files. </li>
<li> data - Where applications store data. </li>
<li> emoticons - Emoticons themes </li>
<li> exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account. </li>
<li> html - HTML documentation. </li>
<li> icon - Icons, see KIconLoader. </li>
<li> kcfg - KConfigXT config files. </li>
<li> lib - Libraries. </li>
<li> locale - Translation files for KLocale. </li>
<li> mime - Mime types defined by KDE-specific .desktop files. </li>
<li> module - Module (dynamically loaded library). </li>
<li> qtplugins - Qt plugins (dynamically loaded objects for Qt) </li>
<li> services - Services. </li>
<li> servicetypes - Service types. </li>
<li> sound - Application sounds. </li>
<li> templates - Templates for the "Create new file" functionality. </li>
<li> wallpaper - Wallpapers. </li>
<li> tmp - Temporary files (specific for both current host and current user) </li>
<li> socket - UNIX Sockets (specific for both current host and current user) </li>
<li> xdgconf-menu - Freedesktop.org standard location for menu layout (.menu) files. </li>
<li> xdgdata-apps - Freedesktop.org standard location for application desktop files. </li>
<li> xdgdata-dirs - Freedesktop.org standard location for menu descriptions (.directory files). </li>
<li> xdgdata-mime - Freedesktop.org standard location for MIME type definitions. </li>
<li> xdgdata-icon - Freedesktop.org standard location for icons. </li>
<li> xdgdata-pixmap - Gnome-compatibility location for pixmaps. </li>
</p>
<p>
A type that is added by the class KApplication if you use it, is
appdata. This one makes the use of the type data a bit easier as it
appends the name of the application.
So while you had to .locate("data", "appname/filename") so you can
also write .locate("appdata", "filename") if your KApplication instance
is called "appname" (as set via KApplication's constructor or KAboutData, if
you use the global KStandardDirs object KGlobal.dirs()).
Please note though that you cannot use the "appdata"
type if you intend to use it in an applet for Kicker because 'appname' would
be "Kicker" instead of the applet's name. Therefore, for applets, you've got
to work around this by using .locate("data", "appletname/filename").
</p>
<p>
<b>KStandardDirs supports the following environment variables:</b>
</p>
<p>
<li> KDEDIRS - This may set an additional number of directory prefixes to </li>
search for resources. The directories should be separated
by <tt>':'</tt>. The directories are searched in the order they are
specified.
<li> KDEHOME - The directory where changes are saved to. This directory is </li>
used to search for resources first. If KDEHOME is not
specified it defaults to "$HOME/.kde"
<li> KDEROOTHOME - Like KDEHOME, but used for the root user. </li>
If KDEROOTHOME is not set it defaults to the <tt>.kde</tt> directory in the
home directory of root, usually "/root/.kde".
Note that the setting of $HOME is ignored in this case.
</p>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd> KGlobalSettings
</dd></dl> </p>
<p>
On The Usage Of 'locate' and 'locateLocal'
</p>
<p>
Typical KDE applications use resource files in one out of
three ways:
</p>
<p>
1) A resource file is read but is never written. A system
default is supplied but the user can override this
default in his local .kde directory:
</p>
<p>
<pre class="fragment">
// Code example
myFile = KStandardDirs.locate("appdata", "groups.lst");
myData = myReadGroups(myFile); // myFile may be null
</pre>
</p>
<p>
2) A resource file is read and written. If the user has no
local version of the file the system default is used.
The resource file is always written to the users local
.kde directory.
</p>
<p>
<pre class="fragment">
// Code example
myFile = KStandardDirs.locate("appdata", "groups.lst")
myData = myReadGroups(myFile);
...
doSomething(myData);
...
myFile = KStandardDirs.locateLocal("appdata", "groups.lst");
myWriteGroups(myFile, myData);
</pre>
</p>
<p>
3) A resource file is read and written. No system default
is used if the user has no local version of the file.
The resource file is always written to the users local
.kde directory.
</p>
<p>
<pre class="fragment">
// Code example
myFile = KStandardDirs.locateLocal("appdata", "groups.lst");
myData = myReadGroups(myFile);
...
doSomething(myData);
...
myFile = KStandardDirs.locateLocal("appdata", "groups.lst");
myWriteGroups(myFile, myData);
</pre>
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#SearchOption">SearchOption</a> </td><td class="memItemRight" valign="bottom">{ NoSearchOptions, Recursive, NoDuplicates, IgnoreExecBit }</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#KStandardDirs">__init__</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#KStandardDirs">__init__</a> (self, <a href="../kdecore/KStandardDirs.html">KStandardDirs</a> a0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#addCustomized">addCustomized</a> (self, <a href="../kdecore/KConfig.html">KConfig</a> config)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#addPrefix">addPrefix</a> (self, QString dir)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#addResourceDir">addResourceDir</a> (self, QString type, QString absdir, bool priority=1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#addResourceType">addResourceType</a> (self, QString type, QString relativename, bool priority=1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#addResourceType">addResourceType</a> (self, QString type, QString basetype, QString relativename, bool priority=1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#addResourceType">addResourceType</a> (self, QString type, QString basetype, QString relativename, bool priority=1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#addXdgConfigPrefix">addXdgConfigPrefix</a> (self, QString dir)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#addXdgDataPrefix">addXdgDataPrefix</a> (self, QString dir)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#allTypes">allTypes</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="#calcResourceHash">calcResourceHash</a> (self, QString type, QString filename, <a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> options=KStandardDirs.NoSearchOptions)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#findAllResources">findAllResources</a> (self, QString type, QString filter=QString(), <a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> options=KStandardDirs.NoSearchOptions)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#findAllResources">findAllResources</a> (self, QString type, QString filter, <a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> options, QStringList relPaths)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#findDirs">findDirs</a> (self, QString type, QString reldir)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#findResource">findResource</a> (self, QString type, QString filename)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#findResourceDir">findResourceDir</a> (self, QString type, QString filename)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#isRestrictedResource">isRestrictedResource</a> (self, QString type, QString relPath=QString())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#kfsstnd_prefixes">kfsstnd_prefixes</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#kfsstnd_xdg_conf_prefixes">kfsstnd_xdg_conf_prefixes</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#kfsstnd_xdg_data_prefixes">kfsstnd_xdg_data_prefixes</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#localkdedir">localkdedir</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#localxdgconfdir">localxdgconfdir</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#localxdgdatadir">localxdgdatadir</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#relativeLocation">relativeLocation</a> (self, QString type, QString absPath)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#resourceDirs">resourceDirs</a> (self, QString type)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#saveLocation">saveLocation</a> (self, QString type, QString suffix=QString(), bool create=1)</td></tr>
<tr><td colspan="2"><br><h2>Static Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#checkAccess">checkAccess</a> (QString pathname, int mode)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#exists">exists</a> (QString fullPath)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#findAllExe">findAllExe</a> (QStringList list, QString appname, QString pathstr=QString(), <a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> options=KStandardDirs.NoSearchOptions)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#findExe">findExe</a> (QString appname, QString pathstr=QString(), <a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> options=KStandardDirs.NoSearchOptions)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#installPath">installPath</a> (QString type)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#kde_default">kde_default</a> (QString type)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#locate">locate</a> (QString type, QString filename, <a href="../kdecore/KComponentData.html">KComponentData</a> cData=KGlobal.mainComponent())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#locateLocal">locateLocal</a> (QString type, QString filename, <a href="../kdecore/KComponentData.html">KComponentData</a> cData=KGlobal.mainComponent())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#locateLocal">locateLocal</a> (QString type, QString filename, bool createDir, <a href="../kdecore/KComponentData.html">KComponentData</a> cData=KGlobal.mainComponent())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#makeDir">makeDir</a> (QString dir, int mode=0755)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#realFilePath">realFilePath</a> (QString filename)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#realPath">realPath</a> (QString dirname)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#systemPaths">systemPaths</a> (QString pstr=QString())</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="KStandardDirs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>KStandardDirs' constructor. It just initializes the caches.
Note that you should normally not call this, but use KGlobal.dirs()
instead, in order to reuse the same KStandardDirs object as much as possible.
</p>
<p>
Creating other KStandardDirs instances can be useful in other threads.
</p>
<p>
Thread safety note: using a shared KStandardDirs instance (such as KGlobal.dirs())
in multiple threads is thread-safe if you only call the readonly "lookup" methods
(findExe, resourceDirs, findDirs, findResourceDir, findAllResources, saveLocation,
relativeLocation). The methods that modify the object (all those starting with "add",
basically all non-const methods) are obviously not thread-safe; set things up
before creating threads.
</p></div></div><a class="anchor" name="KStandardDirs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs</a> </td>
<td class="paramname"><em>a0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>KStandardDirs' constructor. It just initializes the caches.
Note that you should normally not call this, but use KGlobal.dirs()
instead, in order to reuse the same KStandardDirs object as much as possible.
</p>
<p>
Creating other KStandardDirs instances can be useful in other threads.
</p>
<p>
Thread safety note: using a shared KStandardDirs instance (such as KGlobal.dirs())
in multiple threads is thread-safe if you only call the readonly "lookup" methods
(findExe, resourceDirs, findDirs, findResourceDir, findAllResources, saveLocation,
relativeLocation). The methods that modify the object (all those starting with "add",
basically all non-const methods) are obviously not thread-safe; set things up
before creating threads.
</p></div></div><a class="anchor" name="addCustomized"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool addCustomized</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KConfig.html">KConfig</a> </td>
<td class="paramname"><em>config</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Reads customized entries out of the given config object and add
them via addResourceDirs().
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>config</em> </td><td> The object the entries are read from. This should
contain global config files
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if new config paths have been added
from <b>config.</b>
</dd></dl>
</p></div></div><a class="anchor" name="addPrefix"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addPrefix</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>dir</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds another search dir to front of the <b>fsstnd</b> list.
</p>
<p>
<li> When compiling kdelibs, the prefix is added to this. </li>
<li> KDEDIRS is taken into account </li>
<li> Additional dirs may be loaded from kdeglobals. </li>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>dir</em> </td><td> The directory to append relative paths to.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="addResourceDir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool addResourceDir</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>absdir</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>priority=1</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds absolute path at the beginning of the search path for
particular types (for example in case of icons where
the user specifies extra paths).
</p>
<p>
You shouldn't need this
function in 99% of all cases besides adding user-given
paths.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> Specifies a short descriptive string to access files
of this type.
<tr><td></td><td valign="top"><em>absdir</em> </td><td> Points to directory where to look for this specific
type. Non-existent directories may be saved but pruned.
<tr><td></td><td valign="top"><em>priority</em> </td><td> if true, the directory is added before any other,
otherwise after
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="addResourceType"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool addResourceType</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>relativename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>priority=1</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds suffixes for types.
</p>
<p>
You may add as many as you need, but it is advised that there
is exactly one to make writing definite.
All basic types are added by addKDEDefaults(),
but for those you can add more relative paths as well.
</p>
<p>
The later a suffix is added, the higher its priority. Note, that the
suffix should end with / but doesn't have to start with one (as prefixes
should end with one). So adding a suffix for app_pics would look
like KGlobal.dirs()->addResourceType("app_pics", "data", "app/pics");
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> Specifies a short descriptive string to access
files of this type.
<tr><td></td><td valign="top"><em>basetype</em> </td><td> Specifies an already known type, or 0 if none
<tr><td></td><td valign="top"><em>relativename</em> </td><td> Specifies a directory relative to the basetype
<tr><td></td><td valign="top"><em>priority</em> </td><td> if true, the directory is added before any other,
otherwise after
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="addResourceType"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool addResourceType</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>basetype</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>relativename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>priority=1</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds suffixes for types.
</p>
<p>
You may add as many as you need, but it is advised that there
is exactly one to make writing definite.
All basic types are added by addKDEDefaults(),
but for those you can add more relative paths as well.
</p>
<p>
The later a suffix is added, the higher its priority. Note, that the
suffix should end with / but doesn't have to start with one (as prefixes
should end with one). So adding a suffix for app_pics would look
like KGlobal.dirs()->addResourceType("app_pics", "data", "app/pics");
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> Specifies a short descriptive string to access
files of this type.
<tr><td></td><td valign="top"><em>basetype</em> </td><td> Specifies an already known type, or 0 if none
<tr><td></td><td valign="top"><em>relativename</em> </td><td> Specifies a directory relative to the basetype
<tr><td></td><td valign="top"><em>priority</em> </td><td> if true, the directory is added before any other,
otherwise after
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="addResourceType"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool addResourceType</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>basetype</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>relativename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>priority=1</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds suffixes for types.
</p>
<p>
You may add as many as you need, but it is advised that there
is exactly one to make writing definite.
All basic types are added by addKDEDefaults(),
but for those you can add more relative paths as well.
</p>
<p>
The later a suffix is added, the higher its priority. Note, that the
suffix should end with / but doesn't have to start with one (as prefixes
should end with one). So adding a suffix for app_pics would look
like KGlobal.dirs()->addResourceType("app_pics", "data", "app/pics");
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> Specifies a short descriptive string to access
files of this type.
<tr><td></td><td valign="top"><em>basetype</em> </td><td> Specifies an already known type, or 0 if none
<tr><td></td><td valign="top"><em>relativename</em> </td><td> Specifies a directory relative to the basetype
<tr><td></td><td valign="top"><em>priority</em> </td><td> if true, the directory is added before any other,
otherwise after
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false otherwise.
</dd></dl>
</p></div></div><a class="anchor" name="addXdgConfigPrefix"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addXdgConfigPrefix</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>dir</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds another search dir to front of the XDG_CONFIG_XXX list
of prefixes.
This prefix is only used for resources that start with "xdgconf-"
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>dir</em> </td><td> The directory to append relative paths to.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="addXdgDataPrefix"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addXdgDataPrefix</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>dir</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Adds another search dir to front of the XDG_DATA_XXX list
of prefixes.
This prefix is only used for resources that start with "xdgdata-"
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>dir</em> </td><td> The directory to append relative paths to.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="allTypes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList allTypes</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>This function will return a list of all the types that KStandardDirs
supports.
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> All types that KDE supports
</dd></dl>
</p></div></div><a class="anchor" name="calcResourceHash"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">long calcResourceHash</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> </td>
<td class="paramname"><em>options=KStandardDirs.NoSearchOptions</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Returns a number that identifies this version of the resource.
When a change is made to the resource this number will change.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource.
<tr><td></td><td valign="top"><em>options</em> </td><td> If the flags includes Recursive,
all resources are taken into account
otherwise only the one returned by findResource().
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A number identifying the current version of the
resource.
</dd></dl>
</p></div></div><a class="anchor" name="findAllResources"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList findAllResources</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filter=QString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> </td>
<td class="paramname"><em>options=KStandardDirs.NoSearchOptions</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Tries to find all resources with the specified type.
</p>
<p>
The function will look into all specified directories
and return all filenames (full and relative paths) in
these directories.
</p>
<p>
The "most local" files are returned before the "more global" files.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of resource to locate directories for. Can be icon,
lib, pixmap, .... To get a complete list, call
</td></tr> </table></dl>
<p> <pre class="fragment">
kde4-config --types
</pre>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>filter</em> </td><td> Only accept filenames that fit to filter. The filter
may consist of an optional directory and a QRegExp
wildcard expression. E.g. <tt>"images\*.jpg"</tt>.
Use QString() if you do not want a filter.
<tr><td></td><td valign="top"><em>options</em> </td><td> if the flags passed include Recursive, subdirectories
will also be search; if NoDuplicates is passed then only entries with
unique filenames will be returned eliminating duplicates.
</td></tr>
<tr><td></td><td valign="top"><em>relPaths</em> </td><td> The list to store the relative paths into
These can be used later to .locate() the file
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> List of all the files whose filename matches the
specified filter.
</dd></dl>
</p></div></div><a class="anchor" name="findAllResources"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList findAllResources</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> </td>
<td class="paramname"><em>options</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QStringList </td>
<td class="paramname"><em>relPaths</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Tries to find all resources with the specified type.
</p>
<p>
The function will look into all specified directories
and return all filenames (full and relative paths) in
these directories.
</p>
<p>
The "most local" files are returned before the "more global" files.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of resource to locate directories for. Can be icon,
lib, pixmap, .... To get a complete list, call
</td></tr> </table></dl>
<p> <pre class="fragment">
kde4-config --types
</pre>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>filter</em> </td><td> Only accept filenames that fit to filter. The filter
may consist of an optional directory and a QRegExp
wildcard expression. E.g. <tt>"images\*.jpg"</tt>.
Use QString() if you do not want a filter.
<tr><td></td><td valign="top"><em>options</em> </td><td> if the flags passed include Recursive, subdirectories
will also be search; if NoDuplicates is passed then only entries with
unique filenames will be returned eliminating duplicates.
</td></tr>
<tr><td></td><td valign="top"><em>relPaths</em> </td><td> The list to store the relative paths into
These can be used later to .locate() the file
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> List of all the files whose filename matches the
specified filter.
</dd></dl>
</p></div></div><a class="anchor" name="findDirs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList findDirs</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>reldir</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Tries to find all directories whose names consist of the
specified type and a relative path. So
findDirs("apps", "Settings") would return
<li> /home/joe/.kde/share/applnk/Settings/ </li>
<li> /opt/kde/share/applnk/Settings/ </li>
</p>
<p>
(from the most local to the most global)
</p>
<p>
Note that it appends / to the end of the directories,
so you can use this right away as directory names.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the base directory.
<tr><td></td><td valign="top"><em>reldir</em> </td><td> Relative directory.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A list of matching directories, or an empty
list if the resource specified is not found.
</dd></dl>
</p></div></div><a class="anchor" name="findResource"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString findResource</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Tries to find a resource in the following order:
<li> All PREFIX/<relativename> paths (most recent first). </li>
<li> All absolute paths (most recent first). </li>
</p>
<p>
The filename should be a filename relative to the base dir
for resources. So is a way to get the path to libkdecore.la
to findResource("lib", "libkdecore.la"). KStandardDirs will
then look into the subdir lib of all elements of all prefixes
($KDEDIRS) for a file libkdecore.la and return the path to
the first one it finds (e.g. /opt/kde/lib/libkdecore.la).
You can use the program kde4-config to list all resource types:
<pre class="fragment">
$ kde4-config --types
</pre>
</p>
<p>
Example:
<pre class="fragment">
QString iconfilename=KGlobal.dirs()->findResource("icon",QString("oxygen/22x22/apps/ktip.png"));
</pre>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A full path to the filename specified in the second
argument, or QString() if not found.
</dd></dl>
</p></div></div><a class="anchor" name="findResourceDir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString findResourceDir</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Tries to find the directory the file is in.
It works the same as findResource(), but it doesn't
return the filename but the name of the directory.
</p>
<p>
This way the application can access a couple of files
that have been installed into the same directory without
having to look for each file.
</p>
<p>
findResourceDir("lib", "libkdecore.la") would return the
path of the subdir libkdecore.la is found first in
(e.g. /opt/kde/lib/)
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource.
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The directory where the file specified in the second
argument is located, or QString() if the type
of resource specified is unknown or the resource
cannot be found.
</dd></dl>
</p></div></div><a class="anchor" name="isRestrictedResource"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isRestrictedResource</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>relPath=QString()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Checks whether a resource is restricted as part of the KIOSK
framework. When a resource is restricted it means that user-
specific files in the resource are ignored.
</p>
<p>
E.g. by restricting the "wallpaper" resource, only system-wide
installed wallpapers will be found by this class. Wallpapers
installed under the $KDEHOME directory will be ignored.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the resource to check
<tr><td></td><td valign="top"><em>relPath</em> </td><td> A relative path in the resource.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> True if the resource is restricted.
</dd></dl>
</p></div></div><a class="anchor" name="kfsstnd_prefixes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString kfsstnd_prefixes</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="internal" compact><dt><b>Internal:</b></dt><dd> (for use by sycoca only)
</dd></dl>
</p></div></div><a class="anchor" name="kfsstnd_xdg_conf_prefixes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString kfsstnd_xdg_conf_prefixes</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="internal" compact><dt><b>Internal:</b></dt><dd> (for use by sycoca only)
</dd></dl>
</p></div></div><a class="anchor" name="kfsstnd_xdg_data_prefixes"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString kfsstnd_xdg_data_prefixes</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="internal" compact><dt><b>Internal:</b></dt><dd> (for use by sycoca only)
</dd></dl>
</p></div></div><a class="anchor" name="localkdedir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString localkdedir</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the toplevel directory in which KStandardDirs
will store things. Most likely <tt>$HOME/.kde</tt>.
Don't use this function if you can use locateLocal()
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the toplevel directory
</dd></dl>
</p></div></div><a class="anchor" name="localxdgconfdir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString localxdgconfdir</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> $XDG_CONFIG_HOME
See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
</dd></dl>
</p></div></div><a class="anchor" name="localxdgdatadir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString localxdgdatadir</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>self</em> )</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> $XDG_DATA_HOME
See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
</dd></dl>
</p></div></div><a class="anchor" name="relativeLocation"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString relativeLocation</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>absPath</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Converts an absolute path to a path relative to a certain
resource.
</p>
<p>
If "abs = .locate(resource, rel)"
then "rel = relativeLocation(resource, abs)" and vice versa.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of resource.
</td></tr>
<tr><td></td><td valign="top"><em>absPath</em> </td><td> An absolute path to make relative.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A relative path relative to resource <b>type</b> that
will find <b>absPath.</b> If no such relative path exists, <b>absPath</b>
will be returned unchanged.
</dd></dl>
</p></div></div><a class="anchor" name="resourceDirs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList resourceDirs</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This function is used internally by almost all other function as
it serves and fills the directories cache.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of resource
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The list of possible directories for the specified <b>type.</b>
The function updates the cache if possible. If the resource
type specified is unknown, it will return an empty list.
Note, that the directories are assured to exist beside the save
location, which may not exist, but is returned anyway.
</dd></dl>
</p></div></div><a class="anchor" name="saveLocation"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString saveLocation</td>
<td>(</td>
<td class="paramtype"> <em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>suffix=QString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>create=1</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Finds a location to save files into for the given type
in the user's home directory.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of location to return.
<tr><td></td><td valign="top"><em>suffix</em> </td><td> A subdirectory name.
Makes it easier for you to create subdirectories.
You can't pass filenames here, you _have_ to pass
directory names only and add possible filename in
that directory yourself. A directory name always has a
trailing slash ('/').
<tr><td></td><td valign="top"><em>create</em> </td><td> If set, saveLocation() will create the directories
needed (including those given by <b>suffix).</b>
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A path where resources of the specified type should be
saved, or QString() if the resource type is unknown.
</dd></dl>
</p></div></div><hr><h2>Static Method Documentation</h2><a class="anchor" name="checkAccess"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool checkAccess</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>pathname</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>mode</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Check, if a file may be accessed in a given mode.
This is a wrapper around the access() system call.
checkAccess() calls access() with the given parameters.
If this is OK, checkAccess() returns true. If not, and W_OK
is part of mode, it is checked if there is write access to
the directory. If yes, checkAccess() returns true.
In all other cases checkAccess() returns false.
</p>
<p>
Other than access() this function EXPLICITLY ignores non-existent
files if checking for write access.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>pathname</em> </td><td> The full path of the file you want to test
<tr><td></td><td valign="top"><em>mode</em> </td><td> The access mode, as in the access() system call.
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> Whether the access is allowed, true = Access allowed
</dd></dl>
</p></div></div><a class="anchor" name="exists"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool exists</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>fullPath</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Checks for existence and accessability of a file or directory.
Faster than creating a QFileInfo first.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>fullPath</em> </td><td> the path to check. IMPORTANT: must end with a slash if expected to be a directory
(and no slash for a file, obviously).
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the directory exists, false otherwise
</dd></dl>
</p></div></div><a class="anchor" name="findAllExe"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">int findAllExe</td>
<td>(</td>
<td class="paramtype">QStringList </td>
<td class="paramname"><em>list</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>appname</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>pathstr=QString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> </td>
<td class="paramname"><em>options=KStandardDirs.NoSearchOptions</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Finds all occurrences of an executable in the system path.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>list</em> </td><td> will be filled with the pathnames of all the
executables found. Will be empty if the executable
was not found.
<tr><td></td><td valign="top"><em>appname</em> </td><td> the name of the executable for which to
search.
<tr><td></td><td valign="top"><em>pathstr</em> </td><td> the path list which will be searched. If this
is 0 (default), the $PATH environment variable will
be searched.
<tr><td></td><td valign="top"><em>options</em> </td><td> if the flags passed include IgnoreExecBit the path returned
may not have the executable bit set.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The number of executables found, 0 if none were found.
</dd></dl> </p>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd> findExe()
</dd></dl>
</p></div></div><a class="anchor" name="findExe"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString findExe</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>appname</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>pathstr=QString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KStandardDirs.html">KStandardDirs.SearchOptions</a> </td>
<td class="paramname"><em>options=KStandardDirs.NoSearchOptions</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Finds the executable in the system path.
</p>
<p>
A valid executable must
be a file and have its executable bit set.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>appname</em> </td><td> The name of the executable file for which to search.
if this contains a path separator, it will be resolved
according to the current working directory
(shell-like behaviour).
<tr><td></td><td valign="top"><em>pathstr</em> </td><td> The path which will be searched. If this is
null (default), the $PATH environment variable will
be searched.
<tr><td></td><td valign="top"><em>options</em> </td><td> if the flags passed include IgnoreExecBit the path returned
may not have the executable bit set.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The path of the executable. If it was not found,
it will return QString().
</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd> findAllExe()
</dd></dl>
</p></div></div><a class="anchor" name="installPath"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString installPath</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the path where type was installed to by kdelibs. This is an absolute path and only
one out of many search paths
</dd></dl>
</p></div></div><a class="anchor" name="kde_default"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString kde_default</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This returns a default relative path for the standard KDE
resource types. Below is a list of them so you get an idea
of what this is all about.
</p>
<p>
<li> data - share/apps </li>
<li> html - share/doc/HTML </li>
<li> icon - share/icon </li>
<li> config - share/config </li>
<li> pixmap - share/pixmaps </li>
<li> apps - share/applnk </li>
<li> sound - share/sounds </li>
<li> locale - share/locale </li>
<li> services - share/kde4/services </li>
<li> servicetypes - share/kde4/servicetypes </li>
<li> mime - share/mimelnk </li>
<li> cgi - cgi-bin </li>
<li> wallpaper - share/wallpapers </li>
<li> templates - share/templates </li>
<li> exe - bin </li>
<li> lib - lib[suffix] </li>
<li> module - lib[suffix]/kde4 </li>
<li> qtplugins - lib[suffix]/kde4/plugins </li>
<li> kcfg - share/config.kcfg </li>
<li> emoticons - share/emoticons </li>
<li> xdgdata-apps - applications </li>
<li> xdgdata-icon - icons </li>
<li> xdgdata-pixmap - pixmaps </li>
<li> xdgdata-dirs - desktop-directories </li>
<li> xdgdata-mime - mime </li>
<li> xdgconf-menu - menus </li>
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> Static default for the specified resource. You
should probably be using locate() or locateLocal()
instead.
</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd> locate()
</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd> locateLocal()
</dd></dl>
</p></div></div><a class="anchor" name="locate"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString locate</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KComponentData.html">KComponentData</a> </td>
<td class="paramname"><em>cData=KGlobal.mainComponent()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This function is just for convenience. It simply calls
instance->dirs()->\link KStandardDirs.findResource() findResource\endlink(type, filename).
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource, see KStandardDirs
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource
<tr><td></td><td valign="top"><em>cData</em> </td><td> The KComponentData object
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A full path to the filename specified in the second
argument, or QString() if not found
</dd></dl>
</p></div></div><a class="anchor" name="locateLocal"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString locateLocal</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KComponentData.html">KComponentData</a> </td>
<td class="paramname"><em>cData=KGlobal.mainComponent()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This function is much like locate. No check is made if the
specified filename actually exists. Missing directories
are created if <b>createDir</b> is true. If <b>filename</b> is only
a directory, without a specific file, <b>filename</b> must have
a trailing slash.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource, see KStandardDirs
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource
<tr><td></td><td valign="top"><em>createDir</em> </td><td> If true, missing directories are created,
if false, no directory is created
<tr><td></td><td valign="top"><em>cData</em> </td><td> The KComponentData object
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A full path to the filename specified in the second
argument, or QString() if not found
</dd></dl>
</p></div></div><a class="anchor" name="locateLocal"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString locateLocal</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>createDir</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KComponentData.html">KComponentData</a> </td>
<td class="paramname"><em>cData=KGlobal.mainComponent()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>This function is much like locate. No check is made if the
specified filename actually exists. Missing directories
are created if <b>createDir</b> is true. If <b>filename</b> is only
a directory, without a specific file, <b>filename</b> must have
a trailing slash.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>type</em> </td><td> The type of the wanted resource, see KStandardDirs
<tr><td></td><td valign="top"><em>filename</em> </td><td> A relative filename of the resource
<tr><td></td><td valign="top"><em>createDir</em> </td><td> If true, missing directories are created,
if false, no directory is created
<tr><td></td><td valign="top"><em>cData</em> </td><td> The KComponentData object
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A full path to the filename specified in the second
argument, or QString() if not found
</dd></dl>
</p></div></div><a class="anchor" name="makeDir"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool makeDir</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>dir</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>mode=0755</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Recursively creates still-missing directories in the given path.
</p>
<p>
The resulting permissions will depend on the current umask setting.
<tt>permission = mode & ~umask</tt>.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>dir</em> </td><td> Absolute path of the directory to be made.
<tr><td></td><td valign="top"><em>mode</em> </td><td> Directory permissions.
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false otherwise
</dd></dl>
</p></div></div><a class="anchor" name="realFilePath"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString realFilePath</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>filename</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Expands all symbolic links and resolves references to
'/./', '/../' and extra '/' characters in <b>filename</b>
and returns the canonicalized absolute pathname.
The resulting path will have no symbolic link, '/./'
or '/../' components.
</p></div></div><a class="anchor" name="realPath"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString realPath</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>dirname</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Expands all symbolic links and resolves references to
'/./', '/../' and extra '/' characters in <b>dirname</b>
and returns the canonicalized absolute pathname.
The resulting path will have no symbolic link, '/./'
or '/../' components.
</p></div></div><a class="anchor" name="systemPaths"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList systemPaths</td>
<td>(</td>
<td class="paramtype">QString </td>
<td class="paramname"><em>pstr=QString()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Returns a QStringList list of pathnames in the system path.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>pstr</em> </td><td> The path which will be searched. If this is
null (default), the $PATH environment variable will
be searched.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a QStringList list of pathnames in the system path.
</dd></dl>
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="SearchOption"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr><td class="memname">SearchOption</td>
</tr>
</table>
</div>
<div class="memdoc"><dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>NoSearchOptions</em> = 0</td><td><tr><td valign="top"><em>Recursive</em> = 1</td><td><tr><td valign="top"><em>NoDuplicates</em> = 2</td><td><tr><td valign="top"><em>IgnoreExecBit</em> = 4</td><td></table>
</dl>
</div></div><p>
</div>
</div>
</div>
<div id="left">
<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>
</div>
</div>
<div class="clearer"/>
</div>
<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br />
KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
<a href="http://www.kde.org/contact/impressum.php">Legal</a>
</div></div>
</body>
</html>
|