﻿<?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&lt;string&gt; EnumerateDirectories (string path);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateDirectories(string path) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateDirectories (string path, string searchPattern);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateDirectories(string path, string searchPattern) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateDirectories (string path, string searchPattern, System.IO.SearchOption searchOption);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; 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&lt;System.String&gt;</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&lt;string&gt; EnumerateFiles (string path);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateFiles(string path) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateFiles (string path, string searchPattern);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateFiles(string path, string searchPattern) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateFiles (string path, string searchPattern, System.IO.SearchOption searchOption);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; 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&lt;System.String&gt;</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&lt;string&gt; EnumerateFileSystemEntries (string path);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateFileSystemEntries(string path) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateFileSystemEntries (string path, string searchPattern);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; EnumerateFileSystemEntries(string path, string searchPattern) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.IEnumerable&lt;System.String&gt;</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&lt;string&gt; EnumerateFileSystemEntries (string path, string searchPattern, System.IO.SearchOption searchOption);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;string&gt; 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&lt;System.String&gt;</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 "&lt;drive letter&gt;:\".</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>