1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="Directory" FullName="System.IO.Directory" FullNameSP="System_IO_Directory" Maintainer="ecma">
<TypeSignature Language="ILASM" Value=".class public sealed Directory extends System.Object" />
<TypeSignature Language="C#" Value="public static class Directory" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Directory extends System.Object" />
<MemberOfLibrary>BCL</MemberOfLibrary>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="T:System.IO.Directory" /> class for typical operations such as copying, moving, renaming, creating, and deleting directories. </para>
<list type="bullet">
<item>
<para>To create a directory, use one of the <see cref="M:System.IO.Directory.CreateDirectory(System.String)" /> methods.</para>
</item>
<item>
<para>To delete a directory, use one of the <see cref="M:System.IO.Directory.Delete(System.String)" /> methods.</para>
</item>
<item>
<para>To get or set the current directory for an app, use the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> or <see cref="M:System.IO.Directory.SetCurrentDirectory(System.String)" /> method.</para>
</item>
<item>
<para>To manipulate <see cref="T:System.DateTime" /> information related to the creation, access, and writing of a directory, use methods such as <see cref="M:System.IO.Directory.SetLastAccessTime(System.String,System.DateTime)" /> and <see cref="M:System.IO.Directory.SetCreationTime(System.String,System.DateTime)" />.</para>
</item>
</list>
<para>The static methods of the <see cref="T:System.IO.Directory" /> class perform security checks on all methods. If you are going to reuse an object several times, consider using the corresponding instance method of <see cref="T:System.IO.DirectoryInfo" /> instead, because the security check will not always be necessary.</para>
<para>If you are performing only one directory-related action, it might be more efficient to use a static <see cref="T:System.IO.Directory" /> method rather than a corresponding <see cref="T:System.IO.DirectoryInfo" /> instance method. Most <see cref="T:System.IO.Directory" /> methods require the path to the directory that you are manipulating. </para>
<block subset="none" type="note">
<para>In members that accept a string <paramref name="path" /> parameter, that path must be well-formed or an exception is raised. For example, if a path is fully qualified but begins with a space (" c:\temp"), the path string isn't trimmed, so the path is considered malformed and an exception is raised. In addition, a path or a combination of paths cannot be fully qualified twice. For example, "c:\temp c:\windows" also raises an exception. Ensure that your paths are well-formed when using methods that accept a path string. For more information see <see cref="T:System.IO.Path" />.</para>
</block>
<para>In members that accept a path, the path can refer to a file or a directory. You can use a full path, a relative path, or a Universal Naming Convention (UNC) path for a server and share name. For example, all the following are acceptable paths: </para>
<list type="bullet">
<item>
<para>"c:\\MyDir" in C#, or "c:\MyDir" in Visual Basic.</para>
</item>
<item>
<para>"MyDir\\MySubdir" in C#, or "MyDir\MySubDir" in Visual Basic.</para>
</item>
<item>
<para>"\\\\MyServer\\MyShare" in C#, or "\\MyServer\MyShare" in Visual Basic.</para>
</item>
</list>
<para>By default, full read/write access to new directories is granted to all users. However, the app must have the correct security to access existing directories. </para>
<para>To demand permissions for a directory and all its subdirectories, end the path string with the directory separator character. (For example, "C:\Temp\" grants access to C:\Temp\ and all its subdirectories.) To demand permissions only for a specific directory, end the path string with a period. (For example, "C:\Temp\." grants access only to C:\Temp\, not to its subdirectories.)</para>
<para>In members that accept a <paramref name="searchPattern" /> parameter, the search string can be any combination of literal characters and two wildcard characters; * and ?. This parameter does not recognize regular expressions. For more information, see the <see cref="M:System.IO.Directory.EnumerateDirectories(System.String,System.String)" /> method or any other method that uses the <paramref name="searchPattern" /> parameter.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
<para>
<see cref="T:System.IO.Directory" /> and <see cref="T:System.IO.DirectoryInfo" /> are not supported for use in win8_appstore_long apps. For information about how to access files and folders in win8_appstore_long apps, see <see cref="http://msdn.microsoft.com/library/windows/apps/hh758319.aspx">Accessing data and files (Windows Store apps)</see>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.</para>
</summary>
</Docs>
<Members>
<Member MemberName="CreateDirectory">
<MemberSignature Language="C#" Value="public static System.IO.DirectoryInfo CreateDirectory (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.IO.DirectoryInfo CreateDirectory(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.DirectoryInfo</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Any and all directories specified in <paramref name="path" /> are created, unless they already exist or unless some part of <paramref name="path" /> is invalid. If the directory already exists, this method does not create a new directory, but it returns a <see cref="T:System.IO.DirectoryInfo" /> object for the existing directory. </para>
<para>The <paramref name="path" /> parameter specifies a directory path, not a file path.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before creating the directory.</para>
<para>You can create a directory on a remote computer, on a share that you have write access to. UNC paths are supported; for example, you can specify the following for <paramref name="path" />: \\2009\Archives\December in Visual Basic, and \\\\2009\\Archives\\December in C#. </para>
<para>Creating a directory with only the colon character (:) is not supported, and will cause a NotSupportedException to be thrown.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Creates all directories and subdirectories in the specified path unless they already exist.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The directory to create. </param>
</Docs>
</Member>
<Member MemberName="CreateDirectory">
<MemberSignature Language="C#" Value="public static System.IO.DirectoryInfo CreateDirectory (string path, System.Security.AccessControl.DirectorySecurity directorySecurity);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.IO.DirectoryInfo CreateDirectory(string path, class System.Security.AccessControl.DirectorySecurity directorySecurity) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.DirectoryInfo</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="directorySecurity" Type="System.Security.AccessControl.DirectorySecurity" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use this method overload to create a directory with access control, so there is no chance the directory can be accessed before security is applied.</para>
<para>Any and all directories specified in the <paramref name="path" /> parameter are created, unless they already exist or unless some part of <paramref name="path" /> is invalid. The <paramref name="path" /> parameter specifies a directory path, not a file path. If the directory already exists, this method does not create a new directory, but it returns a <see cref="T:System.IO.DirectoryInfo" /> object for the existing directory.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before creating the directory.</para>
<para>You can create a directory on a remote computer, on a share that you have write access to. UNC paths are supported; for example, you can specify the following for <paramref name="path" />: \\2009\Archives\December in Visual Basic, and \\\\2009\\Archives\\December in C#. </para>
<para>Creating a directory with only the colon character (:) is not supported and causes a NotSupportedException to be thrown.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The directory to create.</param>
<param name="directorySecurity">
<attribution license="cc4" from="Microsoft" modified="false" />The access control to apply to the directory.</param>
</Docs>
</Member>
<Member MemberName="Delete">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Delete(string path)" />
<MemberSignature Language="C#" Value="public static void Delete (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void Delete(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path " />is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The specified <paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.IOException">The directory specified by <paramref name="path" /> is read-only or is not empty.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to write to the specified directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method behaves identically to <see cref="M:System.IO.Directory.Delete(System.String,System.Boolean)" /> with false specified for the second parameter.</para>
<para>The <paramref name="path" /> parameter may specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before deleting the directory.</para>
<para>This method throws an <see cref="T:System.IO.IOException" /> if the directory specified in the <paramref name="path" /> parameter contains files or subdirectories.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>In some cases, if you have the specified directory open in File Explorer, the <see cref="M:System.IO.Directory.Delete(System.String)" /> method may not be able to delete it.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Deletes an empty directory from a specified path.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the empty directory to remove. This directory must be writable and empty. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Delete">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Delete(string path, bool recursive)" />
<MemberSignature Language="C#" Value="public static void Delete (string path, bool recursive);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void Delete(string path, bool recursive) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="recursive" Type="System.Boolean" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path " />is <see langword="null" />.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">The specified <paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.IOException">The directory specified by <paramref name="path" /> is read-only, or <paramref name="recursive" /> is <see langword="false" /> and <paramref name="path" /> is not an empty directory.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to write to the specified directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter may specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before deleting the directory.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>If the <paramref name="recursive" /> parameter is true, the user must have write permission for the current directory as well as for all subdirectories.</para>
<para>The behavior of this method differs slightly when deleting a directory that contains a reparse point, such as a symbolic link or a mount point. If the reparse point is a directory, such as a mount point, it is unmounted and the mount point is deleted. This method does not recurse through the reparse point. If the reparse point is a symbolic link to a file, the reparse point is deleted and not the target of the symbolic link.</para>
<para>In some cases, if you have the specified directory open in File Explorer, the <see cref="M:System.IO.Directory.Delete(System.String,System.Boolean)" /> method may not be able to delete it.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Deletes the specified directory and, if indicated, any subdirectories and files in the directory. </para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the directory to remove. </param>
<param name="recursive">
<attribution license="cc4" from="Microsoft" modified="false" />true to remove directories, subdirectories, and files in <paramref name="path" />; otherwise, false. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="EnumerateDirectories">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateDirectories (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateDirectories(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>You can specify relative or absolute path information in the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method. The returned directory names are prefixed with the value you provided in the <paramref name="path" /> parameter. For example, if you provide a relative path in the <paramref name="path" /> parameter, the returned directory names will contain a relative path.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient. </para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of directory names in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name="path" />.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
</Member>
<Member MemberName="EnumerateDirectories">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateDirectories (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateDirectories(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative or absolute path information in the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method. The returned directory names are prefixed with the value you provided in the <paramref name="path" /> parameter. For example, if you provide a relative path in the <paramref name="path" /> parameter, the returned directory names will contain a relative path.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of directory names that match a search pattern in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name="path" /> and that match the specified search pattern.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of directories in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
</Docs>
</Member>
<Member MemberName="EnumerateDirectories">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateDirectories (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateDirectories(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Exactly one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative or absolute path information in the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method. The returned directory names are prefixed with the value you provided in the <paramref name="path" /> parameter. For example, if you provide a relative path in the <paramref name="path" /> parameter, the returned directory names will contain a relative path.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of directory names that match a search pattern in a specified path, and optionally searches subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name="path" /> and that match the specified search pattern and option.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of directories in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.</param>
</Docs>
</Member>
<Member MemberName="EnumerateFiles">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFiles (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFiles(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method. </para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name="path" />.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
</Member>
<Member MemberName="EnumerateFiles">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFiles (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFiles(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Exactly one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names that match a search pattern in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name="path" /> and that match the specified search pattern.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of files in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. </param>
</Docs>
</Member>
<Member MemberName="EnumerateFiles">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFiles (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFiles(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names that match a search pattern in a specified path, and optionally searches subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name="path" /> and that match the specified search pattern and option.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of files in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. </param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.</param>
</Docs>
</Member>
<Member MemberName="EnumerateFileSystemEntries">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFileSystemEntries (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFileSystemEntries(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" /> and <see cref="Overload:System.IO.Directory.GetFileSystemEntries" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" />, you can start enumerating the collection of entries before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFileSystemEntries" />, you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names and directory names in a specified path. </para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of file-system entries in the directory specified by <paramref name="path" />.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
</Member>
<Member MemberName="EnumerateFileSystemEntries">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFileSystemEntries (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFileSystemEntries(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />..</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" /> and <see cref="Overload:System.IO.Directory.GetFileSystemEntries" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" />, you can start enumerating the collection of entries before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFileSystemEntries" />, you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names and directory names that match a search pattern in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of file-system entries in the directory specified by <paramref name="path" /> and that match the specified search pattern.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive. </param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of file-system entries in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. </param>
</Docs>
</Member>
<Member MemberName="EnumerateFileSystemEntries">
<MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable<string> EnumerateFileSystemEntries (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1<string> EnumerateFileSystemEntries(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" /> and <see cref="Overload:System.IO.Directory.GetFileSystemEntries" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" />, you can start enumerating the collection of entries before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFileSystemEntries" />, you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned collection is not cached; each call to the <see cref="M:System.Collections.Generic.IEnumerable`1.GetEnumerator" /> on the collection will start a new enumeration.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An enumerable collection of file-system entries in the directory specified by <paramref name="path" /> and that match the specified search pattern and option.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against file-system entries in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.</param>
</Docs>
</Member>
<Member MemberName="Exists">
<MemberSignature Language="ILASM" Value=".method public hidebysig static bool Exists(string path)" />
<MemberSignature Language="C#" Value="public static bool Exists (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Exists(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-defined invalid characters.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to read the specified directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" qualify="true" />.</permission>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before checking whether the directory exists.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>If you do not have at a minimum read-only permission to the directory, the <see cref="M:System.IO.Directory.Exists(System.String)" /> method will return false. </para>
<para>The <see cref="M:System.IO.Directory.Exists(System.String)" /> method returns false if any error occurs while trying to determine if the specified file exists. This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters, a failing or missing disk, or if the caller does not have permission to read the file.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Determines whether the given path refers to an existing directory on disk.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if <paramref name="path" /> refers to an existing directory; false if the directory does not exist or an error occurs when trying to determine if the specified file exists.</para>
<para>true if <paramref name="path" /> refers to an existing directory; otherwise, false.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path to test. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetAccessControl">
<MemberSignature Language="C#" Value="public static System.Security.AccessControl.DirectorySecurity GetAccessControl (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.AccessControl.DirectorySecurity GetAccessControl(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.AccessControl.DirectorySecurity</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.IO.Directory.GetAccessControl(System.String)" /> method to retrieve the access control list (ACL) entries for a directory.</para>
<para>An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file or directory. For more information, see <format type="text/html"><a href="06fbf66d-6f02-4378-b863-b2f12e349045">ACL Technology Overview</a></format> and <format type="text/html"><a href="53758b39-bd9b-4640-bb04-cad5ed8d0abf">How to: Add or Remove an Access Control List Entry</a></format>.</para>
<para>In NTFS environments, <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" /> are granted to the user if the user has <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> rights on the parent folder. To deny <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" />, deny <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> on the parent directory.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object that encapsulates the access control list (ACL) entries for a specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that encapsulates the access control rules for the file described by the <paramref name="path" /> parameter.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path to a directory containing a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object that describes the file's access control list (ACL) information.</param>
</Docs>
</Member>
<Member MemberName="GetAccessControl">
<MemberSignature Language="C#" Value="public static System.Security.AccessControl.DirectorySecurity GetAccessControl (string path, System.Security.AccessControl.AccessControlSections includeSections);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.AccessControl.DirectorySecurity GetAccessControl(string path, valuetype System.Security.AccessControl.AccessControlSections includeSections) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.AccessControl.DirectorySecurity</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="includeSections" Type="System.Security.AccessControl.AccessControlSections" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="M:System.IO.Directory.GetAccessControl(System.String,System.Security.AccessControl.AccessControlSections)" /> method to retrieve the access control list (ACL) entries for a directory.</para>
<para>An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file or directory. For more information, see <format type="text/html"><a href="06fbf66d-6f02-4378-b863-b2f12e349045">ACL Technology Overview</a></format> and <format type="text/html"><a href="53758b39-bd9b-4640-bb04-cad5ed8d0abf">How to: Add or Remove an Access Control List Entry</a></format>.</para>
<para>In NTFS environments, <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" /> are granted to the user if the user has <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> rights on the parent folder. To deny <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" />, deny <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> on the parent directory.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object that encapsulates the specified type of access control list (ACL) entries for a specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that encapsulates the access control rules for the file described by the <paramref name="path" /> parameter.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path to a directory containing a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object that describes the file's access control list (ACL) information.</param>
<param name="includeSections">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> values that specifies the type of access control list (ACL) information to receive.</param>
</Docs>
</Member>
<Member MemberName="GetCreationTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static valuetype System.DateTime GetCreationTime(string path)" />
<MemberSignature Language="C#" Value="public static DateTime GetCreationTime (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetCreationTime(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">The directory specified by <paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to read the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>This method is equivalent to <see cref="M:System.IO.File.GetCreationTime(System.String)" />.</para>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the creation date and time of a directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the creation date and time for the specified directory. This value is expressed in local time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path of the directory. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetCreationTimeUtc">
<MemberSignature Language="C#" Value="public static DateTime GetCreationTimeUtc (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetCreationTimeUtc(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).</para>
<para>Use this method to get the creation time for a directory based on Coordinated Universal Time (UTC).</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the creation date and time, in Coordinated Universal Time (UTC) format, of a directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the creation date and time for the specified directory. This value is expressed in UTC time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path of the directory. </param>
</Docs>
</Member>
<Member MemberName="GetCurrentDirectory">
<MemberSignature Language="ILASM" Value=".method public hidebysig static string GetCurrentDirectory()" />
<MemberSignature Language="C#" Value="public static string GetCurrentDirectory ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetCurrentDirectory() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the current directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" /></permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The current directory is distinct from the original directory, which is the one from which the process was started.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the current working directory of the application.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A string that contains the path of the current working directory, and does not end with a backslash (\).</para>
</returns>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetDirectories">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetDirectories(string path)" />
<MemberSignature Language="C#" Value="public static string[] GetDirectories (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetDirectories(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="path " />is <see langword="null" />. </exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains implementation-specific invalid characters.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is a file name.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory and its subdirectories. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method is identical to <see cref="M:System.IO.Directory.GetDirectories(System.String,System.String)" /> with the asterisk (*) specified as the search pattern, so it returns all subdirectories.If you need to search subdirectories, use the <see cref="M:System.IO.Directory.GetDirectories(System.String,System.String,System.IO.SearchOption)" /> method, which enables you to specify a search of subdirectories with the <paramref name="searchOption" /> parameter. </para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient.</para>
<para>The <paramref name="path" /> parameter can specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The names returned by this method are prefixed with the directory information provided in <paramref name="path" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive. </para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of subdirectories (including their paths) in the specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) of subdirectories in the specified path, or an empty array if no directories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetDirectories">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetDirectories(string path, string searchPattern)" />
<MemberSignature Language="C#" Value="public static string[] GetDirectories (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetDirectories(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="path " />or<paramref name=" searchPattern " />is <see langword="null" />. </exception>
<exception cref="T:System.Security.SecurityException">The caller does not have permission to access the requested information.</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="path " />is a zero-length string, contains only white space, or contains implementation-specific invalid characters.</para>
<para>
<paramref name="searchPattern" /> does not contain a valid pattern.</para>
</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is a file name.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory and its subdirectories. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have permission to access the requested information.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method returns all subdirectories directly under the specified directory that match the specified search pattern. If the specified directory has no subdirectories, or no subdirectories match the <paramref name="searchPattern" /> parameter, this method returns an empty array. Only the top directory is searched. If you want to search the subdirectories as well, use the <see cref="M:System.IO.Directory.GetDirectories(System.String,System.String,System.IO.SearchOption)" /> method and specify <see cref="F:System.IO.SearchOption.AllDirectories" /> in the <paramref name="searchOption" /> parameter. </para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>The <paramref name="path" /> parameter can specify relative or absolute path information, and is not case-sensitive. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient. </para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of subdirectories (including their paths) that match the specified search pattern in the specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) of the subdirectories that match the search pattern in the specified directory, or an empty array if no directories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of subdirectories in <paramref name="path" />. This parameter can contain a combination of valid literal and wildcard characters (see Remarks), but doesn't support regular expressions. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetDirectories">
<MemberSignature Language="C#" Value="public static string[] GetDirectories (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetDirectories(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter can specify relative or absolute path information, and is not case-sensitive. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> and <see cref="Overload:System.IO.Directory.GetDirectories" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateDirectories" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetDirectories" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateDirectories" /> can be more efficient. </para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) of the subdirectories that match the specified criteria, or an empty array if no directories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of subdirectories in <paramref name="path" />. This parameter can contain a combination of valid literal and wildcard characters (see Remarks), but doesn't support regular expressions.</param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory. </param>
</Docs>
</Member>
<Member MemberName="GetDirectoryRoot">
<MemberSignature Language="ILASM" Value=".method public hidebysig static string GetDirectoryRoot(string path)" />
<MemberSignature Language="C#" Value="public static string GetDirectoryRoot (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetDirectoryRoot(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="path" /> is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. </para>
</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" /></permission>
<example>
<para>The following example demonstrates the <see cref="M:System.IO.Directory.GetDirectoryRoot(System.String)" /> method.</para>
<code lang="C#">using System;
using System.IO;
class GetDirectoryTest {
public static void Main() {
string [] paths = {
@"\ecmatest\examples\pathtests.txt",
"pathtests.xyzzy",
@"\",
@"C:\",
@"\\myserver\myshare\foo\bar\baz.txt"
};
foreach (string pathString in paths) {
string s = Directory.GetDirectoryRoot(pathString);
Console.WriteLine("Path: {0} Directory Root is {1}",pathString, s== null? "null":s);
}
}
}
</code>
<para>The output is </para>
<c>
<para>Path: \ecmatest\examples\pathtests.txt Directory Root is C:\</para>
<para>Path: pathtests.xyzzy Directory Root is C:\</para>
<para>Path: \ Directory Root is C:\</para>
<para>Path: C:\ Directory Root is C:\</para>
<para>Path: \\myserver\myshare\foo\bar\baz.txt
Directory Root is \\myserver\myshare</para>
</c>
</example>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method obtains the fully qualified path name of <paramref name="path" />, as returned by <see cref="M:System.IO.Path.GetFullPath(System.String)" />, and returns root directory information. The specified path is not required to exist.</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the volume information, root information, or both for the specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A string that contains the volume information, root information, or both for the specified path.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path of a file or directory. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetFiles">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetFiles(string path)" />
<MemberSignature Language="C#" Value="public static string[] GetFiles (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFiles(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="path " />is null.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. </para>
</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is a file name.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory and the files in that directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The returned file names are appended to the supplied <paramref name="path" /> parameter.</para>
<para>This method is identical to <see cref="M:System.IO.Directory.GetFiles(System.String,System.String)" /> with the asterisk (*) specified as the search pattern.</para>
<para>The <paramref name="path" /> parameter can specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The order of the returned file names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required. </para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of files (including their paths) in the specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) for the files in the specified directory, or an empty array if no files are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetFiles">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetFiles(string path, string searchPattern)" />
<MemberSignature Language="C#" Value="public static string[] GetFiles (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFiles(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="searchPattern " />or <paramref name="path" /> is <see langword="null" /> .</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="path" /> is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</para>
<para>-or-</para>
<para>
<paramref name="searchPattern" /> does not contain a valid pattern.</para>
</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is an existing file name.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory and the files in that directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" /></permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The returned file names are appended to the supplied <paramref name="path" /> parameter and the order of the returned file names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required. </para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<block subset="none" type="note">
<para>When you use the asterisk wildcard character in a <paramref name="searchPattern" /> such as "*.txt", the number of characters in the specified extension affects the search as follows: </para>
<list type="bullet">
<item>
<para>If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "*.xls" returns both "book.xls" and "book.xlsx".</para>
</item>
<item>
<para>In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".</para>
</item>
</list>
<para>When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file*.txt" returns both files.</para>
</block>
<block subset="none" type="note">
<para>Because this method checks against file names with both the 8.3 file name format and the long file name format, a search pattern similar to "*1*.txt" may return unexpected file names. For example, using a search pattern of "*1*.txt" returns "longfilename.txt" because the equivalent 8.3 file name format is "LONGFI~1.TXT".</para>
</block>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The <paramref name="path" /> parameter can specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of files (including their paths) that match the specified search pattern in the specified directory.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern, or an empty array if no files are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of files in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetFiles">
<MemberSignature Language="C#" Value="public static string[] GetFiles (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFiles(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The returned file names are appended to the supplied parameter <paramref name="path" /> and the order of the returned file names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required. </para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<block subset="none" type="note">
<para>When you use the asterisk wildcard character in a <paramref name="searchPattern" /> such as "*.txt", the number of characters in the specified extension affects the search as follows: </para>
<list type="bullet">
<item>
<para>If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "*.xls" returns both "book.xls" and "book.xlsx".</para>
</item>
<item>
<para>In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".</para>
</item>
</list>
<para>When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file*.txt" returns both files.</para>
</block>
<block subset="none" type="note">
<para>Because this method checks against file names with both the 8.3 file name format and the long file name format, a search pattern similar to "*1*.txt" may return unexpected file names. For example, using a search pattern of "*1*.txt" returns "longfilename.txt" because the equivalent 8.3 file name format is "LONGFI~1.TXT".</para>
</block>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFiles" /> and <see cref="Overload:System.IO.Directory.GetFiles" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFiles" />, you can start enumerating the collection of names before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFiles" />, you must wait for the whole array of names to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>The file names include the full path.</para>
<para>The <paramref name="path" /> parameter can specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of files (including their paths) that match the specified search pattern in the specified directory, using a value to determine whether to search subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern and option, or an empty array if no files are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of files in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory. </param>
</Docs>
</Member>
<Member MemberName="GetFileSystemEntries">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetFileSystemEntries(string path)" />
<MemberSignature Language="C#" Value="public static string[] GetFileSystemEntries (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFileSystemEntries(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" /> .</exception>
<exception cref="T:System.ArgumentException">
<paramref name="path" /> is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is a file name.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" /></permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The order of the returned file and directory names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required.</para>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" /> and <see cref="Overload:System.IO.Directory.GetFileSystemEntries" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" />, you can start enumerating the collection of entries before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFileSystemEntries" />, you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>This method is identical to <see cref="M:System.IO.Directory.GetFileSystemEntries(System.String,System.String)" /> with the asterisk (*) specified as the search pattern.</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the names of all files and subdirectories in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of the names of files and subdirectories in the specified directory, or an empty array if no files or subdirectories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetFileSystemEntries">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.String[] GetFileSystemEntries(string path, string searchPattern)" />
<MemberSignature Language="C#" Value="public static string[] GetFileSystemEntries (string path, string searchPattern);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFileSystemEntries(string path, string searchPattern) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentNullException">
<paramref name="searchPattern " />or <paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="path" /> is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</para>
<para>-or-</para>
<para>
<paramref name="searchPattern" /> does not contain a valid pattern.</para>
</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.IO.IOException">
<paramref name="path" /> is a file name.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to access path information for the specified directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.PathDiscovery" qualify="true" /></permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The order of the returned file and directory names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required.</para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<block subset="none" type="note">
<para>When you use the asterisk wildcard character in a <paramref name="searchPattern" /> such as "*.txt", the number of characters in the specified extension affects the search as follows: </para>
<list type="bullet">
<item>
<para>If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "*.xls" returns both "book.xls" and "book.xlsx".</para>
</item>
<item>
<para>In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".</para>
</item>
</list>
<para>When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file*.txt" returns both files.</para>
</block>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an array of file names and directory names that that match a search pattern in a specified path.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of file names and directory names that match the specified search criteria, or an empty array if no files or directories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of file and directories in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetFileSystemEntries">
<MemberSignature Language="C#" Value="public static string[] GetFileSystemEntries (string path, string searchPattern, System.IO.SearchOption searchOption);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetFileSystemEntries(string path, string searchPattern, valuetype System.IO.SearchOption searchOption) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="searchPattern" Type="System.String" />
<Parameter Name="searchOption" Type="System.IO.SearchOption" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The order of the returned file and directory names is not guaranteed; use the <see cref="Overload:System.Array.Sort" /> method if a specific sort order is required.</para>
<para>
<paramref name="searchPattern" /> can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in <paramref name="searchPattern" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Wildcard specifier </para>
</term>
<description>
<para>Matches </para>
</description>
</item>
</listheader>
<item>
<term>
<para>* (asterisk)</para>
</term>
<description>
<para>Zero or more characters in that position. </para>
</description>
</item>
<item>
<term>
<para>? (question mark)</para>
</term>
<description>
<para>Zero or one character in that position. </para>
</description>
</item>
</list>
<para>Characters other than the wildcard are literal characters. For example, the <paramref name="searchPattern" /> string "*t" searches for all names in <paramref name="path" /> ending with the letter "t". The <paramref name="searchPattern" /> string "s*" searches for all names in <paramref name="path" /> beginning with the letter "s".</para>
<para>
<paramref name="searchPattern" /> cannot end in two periods ("..") or contain two periods ("..") followed by <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />, nor can it contain any invalid characters. You can query for invalid characters by using the <see cref="M:System.IO.Path.GetInvalidPathChars" /> method.</para>
<block subset="none" type="note">
<para>When you use the asterisk wildcard character in a <paramref name="searchPattern" /> such as "*.txt", the number of characters in the specified extension affects the search as follows: </para>
<list type="bullet">
<item>
<para>If the specified extension is exactly three characters long, the method returns files with extensions that begin with the specified extension. For example, "*.xls" returns both "book.xls" and "book.xlsx".</para>
</item>
<item>
<para>In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".</para>
</item>
</list>
<para>When you use the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, whereas a search pattern of "file*.txt" returns both files.</para>
</block>
<para>The <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" /> and <see cref="Overload:System.IO.Directory.GetFileSystemEntries" /> methods differ as follows: When you use <see cref="Overload:System.IO.Directory.EnumerateFileSystemEntries" />, you can start enumerating the collection of entries before the whole collection is returned; when you use <see cref="Overload:System.IO.Directory.GetFileSystemEntries" />, you must wait for the whole array of entries to be returned before you can access the array. Therefore, when you are working with many files and directories, <see cref="Overload:System.IO.Directory.EnumerateFiles" /> can be more efficient.</para>
<para>You can specify relative path information with the <paramref name="path" /> parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the <see cref="M:System.IO.Directory.GetCurrentDirectory" /> method.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an array of all the file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of file the file names and directory names that match the specified search criteria, or an empty array if no files or directories are found.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The relative or absolute path to the directory to search. This string is not case-sensitive.</param>
<param name="searchPattern">
<attribution license="cc4" from="Microsoft" modified="false" />The search string to match against the names of files and directories in <paramref name="path" />. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.</param>
<param name="searchOption">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.</param>
</Docs>
</Member>
<Member MemberName="GetLastAccessTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static valuetype System.DateTime GetLastAccessTime(string path)" />
<MemberSignature Language="C#" Value="public static DateTime GetLastAccessTime (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetLastAccessTime(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">The specified path was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to read the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>This method is identical to <see cref="M:System.IO.File.GetLastAccessTime(System.String)" />.</para>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the date and time the specified file or directory was last accessed.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the date and time the specified file or directory was last accessed. This value is expressed in local time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to obtain access date and time information. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetLastAccessTimeUtc">
<MemberSignature Language="C#" Value="public static DateTime GetLastAccessTimeUtc (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetLastAccessTimeUtc(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last accessed.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the date and time the specified file or directory was last accessed. This value is expressed in UTC time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to obtain access date and time information. </param>
</Docs>
</Member>
<Member MemberName="GetLastWriteTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static valuetype System.DateTime GetLastWriteTime(string path)" />
<MemberSignature Language="C#" Value="public static DateTime GetLastWriteTime (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetLastWriteTime(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">The specified path was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to read the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the date and time the specified file or directory was last written to.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the date and time the specified file or directory was last written to. This value is expressed in local time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to obtain modification date and time information. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetLastWriteTimeUtc">
<MemberSignature Language="C#" Value="public static DateTime GetLastWriteTimeUtc (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.DateTime GetLastWriteTimeUtc(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<block subset="none" type="note">
<para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.</para>
</block>
<para>If the directory described in the <paramref name="path" /> parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last written to.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A structure that is set to the date and time the specified file or directory was last written to. This value is expressed in UTC time.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to obtain modification date and time information. </param>
</Docs>
</Member>
<Member MemberName="GetLogicalDrives">
<MemberSignature Language="C#" Value="public static string[] GetLogicalDrives ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string[] GetLogicalDrives() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>GetLogicalDrives returns all of the accessible drives on a particular machine, including the floppy drive and any optical drives.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Retrieves the names of the logical drives on this computer in the form "<drive letter>:\".</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The logical drives on this computer.</para>
</returns>
</Docs>
</Member>
<Member MemberName="GetParent">
<MemberSignature Language="C#" Value="public static System.IO.DirectoryInfo GetParent (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.IO.DirectoryInfo GetParent(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.DirectoryInfo</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before getting the directory.</para>
<para>The string returned by this method consists of all characters in the path up to, but not including, the last <see cref="F:System.IO.Path.DirectorySeparatorChar" /> or <see cref="F:System.IO.Path.AltDirectorySeparatorChar" />. For example, passing the path "C:\Directory\SubDirectory\test.txt" to <see cref="M:System.IO.Directory.GetParent(System.String)" /> returns "C:\Directory\SubDirectory". Passing "C:\Directory\SubDirectory" returns "C:\Directory". However, passing "C:\Directory\SubDirectory\" returns "C:\Directory\SubDirectory", because the ending directory separator is after "SubDirectory".</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Retrieves the parent directory of the specified path, including both absolute and relative paths.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The parent directory, or null if <paramref name="path" /> is the root directory, including the root of a UNC server or share name.</para>
</returns>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path for which to retrieve the parent directory. </param>
</Docs>
</Member>
<Member MemberName="Move">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Move(string sourceDirName, string destDirName)" />
<MemberSignature Language="C#" Value="public static void Move (string sourceDirName, string destDirName);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void Move(string sourceDirName, string destDirName) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceDirName" Type="System.String" />
<Parameter Name="destDirName" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="sourceDirName " />or <paramref name="destDirName " />is a zero-length string, contains only white space, or contains implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="sourceDirName " />or <paramref name="destDirName " />is <see langword="null" />.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<exception cref="T:System.IO.IOException">
<para>An attempt was made to move a directory to a different volume,</para>
<para>-or-</para>
<para>
<paramref name="destDirName" /> already exists.</para>
<para>-or-</para>
<para>
<paramref name="sourceDirName" /> and <paramref name="destDirName" /> refer to the same file or directory.</para>
</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">
<paramref name="sourceDirName " /> was not found.</exception>
<exception cref="T:System.IO.PathTooLongException">The length or absolute path information for <paramref name="sourceDirName" /> or <paramref name="destDirName" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to read from <paramref name="sourceDirName," /><paramref name=" " />and write to <paramref name="sourceDirName " /> and <paramref name="destDirName" />. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" qualify="true" />, <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method creates a new directory with the name specified by <paramref name="destDirName" /> and moves the contents of <paramref name="sourceDirName" /> to the newly created destination directory. If you try to move a directory to a directory that already exists, an <see cref="T:System.IO.IOException" /> will occur. For example, an exception will occur if you try to move c:\mydir to c:\public, and c:\public already exists. Alternatively, you could specify "c:\\public\\mydir" as the <paramref name="destDirName" /> parameter, provided that "mydir" does not exist under "c:\\public", or specify a new directory name such as "c:\\newdir".</para>
<para>The <paramref name="sourceDirName" /> and <paramref name="destDirName" /> arguments are permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>Trailing spaces are removed from the end of the path parameters before moving the directory.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Moves a file or a directory and its contents to a new location.</para>
</summary>
<param name="sourceDirName">
<attribution license="cc4" from="Microsoft" modified="false" />The path of the file or directory to move. </param>
<param name="destDirName">
<attribution license="cc4" from="Microsoft" modified="false" />The path to the new location for <paramref name="sourceDirName" />. If <paramref name="sourceDirName" /> is a file, then <paramref name="destDirName" /> must also be a file name.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetAccessControl">
<MemberSignature Language="C#" Value="public static void SetAccessControl (string path, System.Security.AccessControl.DirectorySecurity directorySecurity);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetAccessControl(string path, class System.Security.AccessControl.DirectorySecurity directorySecurity) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="directorySecurity" Type="System.Security.AccessControl.DirectorySecurity" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.IO.Directory.SetAccessControl(System.String,System.Security.AccessControl.DirectorySecurity)" /> method applies access control list (ACL) entries to a file that represents the noninherited ACL list.</para>
<block subset="none" type="note">
<para>The ACL specified for the <paramref name="directorySecurity" /> parameter replaces the existing ACL for the directory. To add permissions for a new user, use the <see cref="Overload:System.IO.Directory.GetAccessControl" /> method to obtain the existing ACL and modify it.</para>
</block>
<para>An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file or directory. For more information, see <format type="text/html"><a href="06fbf66d-6f02-4378-b863-b2f12e349045">ACL Technology Overview</a></format> and <format type="text/html"><a href="53758b39-bd9b-4640-bb04-cad5ed8d0abf">How to: Add or Remove an Access Control List Entry</a></format>.</para>
<para>The <see cref="M:System.IO.Directory.SetAccessControl(System.String,System.Security.AccessControl.DirectorySecurity)" /> method persists only <see cref="T:System.Security.AccessControl.DirectorySecurity" /> objects that have been modified after object creation. If a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object has not been modified, it will not be persisted to a file. Therefore, it is not possible to retrieve a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object from one file and reapply the same object to another file.</para>
<para>To copy ACL information from one file to another:</para>
<list type="ordered">
<item>
<para>Use the <see cref="Overload:System.IO.Directory.GetAccessControl" /> method to retrieve the <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object from the source file.</para>
</item>
<item>
<para>Create a new <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object for the destination file.</para>
</item>
<item>
<para>Use the <see cref="M:System.Security.AccessControl.ObjectSecurity.GetSecurityDescriptorBinaryForm" /> or <see cref="M:System.Security.AccessControl.ObjectSecurity.GetSecurityDescriptorSddlForm(System.Security.AccessControl.AccessControlSections)" /> method of the source <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object to retrieve the ACL information.</para>
</item>
<item>
<para>Use the <see cref="M:System.Security.AccessControl.ObjectSecurity.SetSecurityDescriptorBinaryForm(System.Byte[])" /> or <see cref="M:System.Security.AccessControl.ObjectSecurity.SetSecurityDescriptorSddlForm(System.String)" /> method to copy the information retrieved in step 3 to the destination <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object.</para>
</item>
<item>
<para>Set the destination <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object to the destination file using the <see cref="M:System.IO.Directory.SetAccessControl(System.String,System.Security.AccessControl.DirectorySecurity)" /> method. </para>
</item>
</list>
<para>In NTFS environments, <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" /> are granted to the user if the user has <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> rights on the parent folder. To deny <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" />, deny <see cref="F:System.Security.AccessControl.FileSystemRights.ListDirectory" /> on the parent directory.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Applies access control list (ACL) entries described by a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object to the specified directory.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />A directory to add or remove access control list (ACL) entries from.</param>
<param name="directorySecurity">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object that describes an ACL entry to apply to the directory described by the <paramref name="path" /> parameter.</param>
</Docs>
</Member>
<Member MemberName="SetCreationTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void SetCreationTime(string path, valuetype System.DateTime creationTime)" />
<MemberSignature Language="C#" Value="public static void SetCreationTime (string path, DateTime creationTime);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetCreationTime(string path, valuetype System.DateTime creationTime) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="creationTime" Type="System.DateTime" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="creationTime " /> specifies a value outside the range of date/times permitted for this operation.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.FileNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred while performing the operation.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to write to the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the creation date and time for the specified file or directory.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to set the creation date and time information. </param>
<param name="creationTime">
<attribution license="cc4" from="Microsoft" modified="false" />The date and time the file or directory was last written to. This value is expressed in local time.</param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetCreationTimeUtc">
<MemberSignature Language="C#" Value="public static void SetCreationTimeUtc (string path, DateTime creationTimeUtc);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetCreationTimeUtc(string path, valuetype System.DateTime creationTimeUtc) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="creationTimeUtc" Type="System.DateTime" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the creation date and time, in Coordinated Universal Time (UTC) format, for the specified file or directory.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to set the creation date and time information. </param>
<param name="creationTimeUtc">
<attribution license="cc4" from="Microsoft" modified="false" />The date and time the directory or file was created. This value is expressed in local time.</param>
</Docs>
</Member>
<Member MemberName="SetCurrentDirectory">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void SetCurrentDirectory(string path)" />
<MemberSignature Language="C#" Value="public static void SetCurrentDirectory (string path);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetCurrentDirectory(string path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.FileNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred while performing the operation.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission to access unmanaged code.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When the application terminates, the working directory is restored to its original location (the directory where the process was started).</para>
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>Trailing spaces are removed from the end of the <paramref name="path" /> parameter before setting the directory.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>If you are setting the directory to a drive with removable media (for example, to "A:" for a floppy disk drive or "E:" for a CD-ROM drive), you can determine whether the drive is ready by using the <see cref="P:System.IO.DriveInfo.IsReady" /> property.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the application's current working directory to the specified directory.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path to which the current working directory is set. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetLastAccessTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void SetLastAccessTime(string path, valuetype System.DateTime lastAccessTime)" />
<MemberSignature Language="C#" Value="public static void SetLastAccessTime (string path, DateTime lastAccessTime);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetLastAccessTime(string path, valuetype System.DateTime lastAccessTime) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="lastAccessTime" Type="System.DateTime" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred while performing the operation.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to write to the specified file or directory. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="lastAccessTime" /> specifies a value outside the range of date/times permitted for this operation.</exception>
<exception cref="T:System.IO.FileNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the date and time the specified file or directory was last accessed.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to set the access date and time information. </param>
<param name="lastAccessTime">
<attribution license="cc4" from="Microsoft" modified="false" />An object that contains the value to set for the access date and time of <paramref name="path" />. This value is expressed in local time. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetLastAccessTimeUtc">
<MemberSignature Language="C#" Value="public static void SetLastAccessTimeUtc (string path, DateTime lastAccessTimeUtc);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetLastAccessTimeUtc(string path, valuetype System.DateTime lastAccessTimeUtc) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="lastAccessTimeUtc" Type="System.DateTime" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last accessed.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The file or directory for which to set the access date and time information. </param>
<param name="lastAccessTimeUtc">
<attribution license="cc4" from="Microsoft" modified="false" />An object that contains the value to set for the access date and time of <paramref name="path" />. This value is expressed in UTC time. </param>
</Docs>
</Member>
<Member MemberName="SetLastWriteTime">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void SetLastWriteTime(string path, valuetype System.DateTime lastWriteTime)" />
<MemberSignature Language="C#" Value="public static void SetLastWriteTime (string path, DateTime lastWriteTime);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetLastWriteTime(string path, valuetype System.DateTime lastWriteTime) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="lastWriteTime" Type="System.DateTime" />
</Parameters>
<Docs>
<exception cref="T:System.ArgumentException">
<paramref name="path " />is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="path" /> is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred while performing the operation.</exception>
<exception cref="T:System.IO.PathTooLongException">The length of <paramref name="path" /> or the absolute path information for <paramref name="path" /> exceeds the system-defined maximum length.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
<permission cref="T:System.Security.Permissions.FileIOPermission">Requires permission to write to the specified file. See <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" qualify="true" />.</permission>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="lastWriteTime" /> specifies a value outside the range of date/times permitted for this operation.</exception>
<exception cref="T:System.IO.FileNotFoundException">
<paramref name="path" /> was not found.</exception>
<exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the date and time a directory was last written to.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path of the directory. </param>
<param name="lastWriteTime">
<attribution license="cc4" from="Microsoft" modified="false" />The date and time the directory was last written to. This value is expressed in local time. </param>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetLastWriteTimeUtc">
<MemberSignature Language="C#" Value="public static void SetLastWriteTimeUtc (string path, DateTime lastWriteTimeUtc);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetLastWriteTimeUtc(string path, valuetype System.DateTime lastWriteTimeUtc) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="System.String" />
<Parameter Name="lastWriteTimeUtc" Type="System.DateTime" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="path" /> parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</para>
<para>The <paramref name="path" /> parameter is not case-sensitive.</para>
<para>For a list of common I/O tasks, see <format type="text/html"><a href="bf00c380-706a-4e38-b829-454a480629fc">Common I/O Tasks</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the date and time, in Coordinated Universal Time (UTC) format, that a directory was last written to.</para>
</summary>
<param name="path">
<attribution license="cc4" from="Microsoft" modified="false" />The path of the directory. </param>
<param name="lastWriteTimeUtc">
<attribution license="cc4" from="Microsoft" modified="false" />The date and time the directory was last written to. This value is expressed in UTC time. </param>
</Docs>
</Member>
</Members>
<TypeExcluded>0</TypeExcluded>
</Type>
|