BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object System.Runtime.InteropServices.ComVisible(true)

Use the class for typical operations such as copying, moving, renaming, creating, and deleting directories.

To create a directory, use one of the methods.

To delete a directory, use one of the methods.

To get or set the current directory for an app, use the or method.

To manipulate information related to the creation, access, and writing of a directory, use methods such as and .

The static methods of the class perform security checks on all methods. If you are going to reuse an object several times, consider using the corresponding instance method of instead, because the security check will not always be necessary.

If you are performing only one directory-related action, it might be more efficient to use a static method rather than a corresponding instance method. Most methods require the path to the directory that you are manipulating.

In members that accept a string 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 .

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:

"c:\\MyDir" in C#, or "c:\MyDir" in Visual Basic.

"MyDir\\MySubdir" in C#, or "MyDir\MySubDir" in Visual Basic.

"\\\\MyServer\\MyShare" in C#, or "\\MyServer\MyShare" in Visual Basic.

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.

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.)

In members that accept a 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 method or any other method that uses the parameter.

For a list of common I/O tasks, see Common I/O Tasks.

and 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 Accessing data and files (Windows Store apps).

Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.DirectoryInfo ``

  Any and all directories specified in are created, unless they already exist or unless some part of is invalid. If the directory already exists, this method does not create a new directory, but it returns a object for the existing directory.

  The parameter specifies a directory path, not a file path.

  Trailing spaces are removed from the end of the parameter before creating the directory.

  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 : \\2009\Archives\December in Visual Basic, and \\\\2009\\Archives\\December in C#.

  Creating a directory with only the colon character (:) is not supported, and will cause a NotSupportedException to be thrown.

  Creates all directories and subdirectories in the specified path unless they already exist.

  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.

  The directory to create.
- Method
  2.0.0.0
  4.0.0.0
  System.IO.DirectoryInfo `` ``

  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.

  Any and all directories specified in the parameter are created, unless they already exist or unless some part of is invalid. The 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 object for the existing directory.

  Trailing spaces are removed from the end of the parameter before creating the directory.

  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 : \\2009\Archives\December in Visual Basic, and \\\\2009\\Archives\\December in C#.

  Creating a directory with only the colon character (:) is not supported and causes a NotSupportedException to be thrown.

  Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.

  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.

  The directory to create. The access control to apply to the directory.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . The specified was not found. The directory specified by is read-only or is not empty. The caller does not have the required permission. The length of or the absolute path information for exceeds the system-defined maximum length. Requires permission to write to the specified directory. See . The caller does not have the required permission.

  This method behaves identically to with false specified for the second parameter.

  The 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 .

  Trailing spaces are removed from the end of the parameter before deleting the directory.

  This method throws an if the directory specified in the parameter contains files or subdirectories.

  The parameter is not case-sensitive.

  In some cases, if you have the specified directory open in File Explorer, the method may not be able to delete it.

  Deletes an empty directory from a specified path.

  The name of the empty directory to remove. This directory must be writable and empty. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . The specified was not found. The directory specified by is read-only, or is and is not an empty directory. The caller does not have the required permission. The length of or the absolute path information for exceeds the system-defined maximum length. Requires permission to write to the specified directory. See . The caller does not have the required permission.

  The 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 .

  Trailing spaces are removed from the end of the parameter before deleting the directory.

  The parameter is not case-sensitive.

  If the parameter is true, the user must have write permission for the current directory as well as for all subdirectories.

  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.

  In some cases, if you have the specified directory open in File Explorer, the method may not be able to delete it.

  Deletes the specified directory and, if indicated, any subdirectories and files in the directory.

  The name of the directory to remove. true to remove directories, subdirectories, and files in ; otherwise, false. 0
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> ``

  You can specify relative or absolute path information in the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method. The returned directory names are prefixed with the value you provided in the parameter. For example, if you provide a relative path in the parameter, the returned directory names will contain a relative path.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of directory names in a specified path.

  An enumerable collection of the full names (including paths) for the directories in the directory specified by .

  The relative or absolute path to the directory to search. This string is not case-sensitive.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative or absolute path information in the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method. The returned directory names are prefixed with the value you provided in the parameter. For example, if you provide a relative path in the parameter, the returned directory names will contain a relative path.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of directory names that match a search pattern in a specified path.

  An enumerable collection of the full names (including paths) for the directories in the directory specified by and that match the specified search pattern.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Exactly one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative or absolute path information in the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method. The returned directory names are prefixed with the value you provided in the parameter. For example, if you provide a relative path in the parameter, the returned directory names will contain a relative path.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of directory names that match a search pattern in a specified path, and optionally searches subdirectories.

  An enumerable collection of the full names (including paths) for the directories in the directory specified by and that match the specified search pattern and option.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> ``

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names in a specified path.

  An enumerable collection of the full names (including paths) for the files in the directory specified by .

  The relative or absolute path to the directory to search. This string is not case-sensitive.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Exactly one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names that match a search pattern in a specified path.

  An enumerable collection of the full names (including paths) for the files in the directory specified by and that match the specified search pattern.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names that match a search pattern in a specified path, and optionally searches subdirectories.

  An enumerable collection of the full names (including paths) for the files in the directory specified by and that match the specified search pattern and option.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> ``

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names and directory names in a specified path.

  An enumerable collection of file-system entries in the directory specified by .

  The relative or absolute path to the directory to search. This string is not case-sensitive.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in ..

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names and directory names that match a search pattern in a specified path.

  An enumerable collection of file-system entries in the directory specified by and that match the specified search pattern.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of file-system entries in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.
- Method
  4.0.0.0
  System.Collections.Generic.IEnumerable<System.String> `` `` ``

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , 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, can be more efficient.

  The returned collection is not cached; each call to the on the collection will start a new enumeration.

  Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.

  An enumerable collection of file-system entries in the directory specified by and that match the specified search pattern and option.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against file-system entries in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` is a zero-length string, contains only white space, or contains one or more implementation-defined invalid characters. The length of or the absolute path information for exceeds the system-defined maximum length. was not found. Requires permission to read the specified directory. See .

  The parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory.

  Trailing spaces are removed from the end of the parameter before checking whether the directory exists.

  The parameter is not case-sensitive.

  If you do not have at a minimum read-only permission to the directory, the method will return false.

  The 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.

  Determines whether the given path refers to an existing directory on disk.

  true if 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.

  true if refers to an existing directory; otherwise, false.

  The path to test. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.DirectorySecurity ``

  Use the method to retrieve the access control list (ACL) entries for a directory.

  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 ACL Technology Overview and How to: Add or Remove an Access Control List Entry.

  In NTFS environments, and are granted to the user if the user has rights on the parent folder. To deny and , deny on the parent directory.

  Gets a object that encapsulates the access control list (ACL) entries for a specified directory.

  An object that encapsulates the access control rules for the file described by the parameter.

  The path to a directory containing a object that describes the file's access control list (ACL) information.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.AccessControl.DirectorySecurity `` ``

  Use the method to retrieve the access control list (ACL) entries for a directory.

  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 ACL Technology Overview and How to: Add or Remove an Access Control List Entry.

  In NTFS environments, and are granted to the user if the user has rights on the parent folder. To deny and , deny on the parent directory.

  Gets a object that encapsulates the specified type of access control list (ACL) entries for a specified directory.

  An object that encapsulates the access control rules for the file described by the parameter.

  The path to a directory containing a object that describes the file's access control list (ACL) information. One of the values that specifies the type of access control list (ACL) information to receive.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . The directory specified by was not found. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to read the specified file or directory. See . The caller does not have the required permission.

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  This method is equivalent to .

  If the directory described in the 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.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Gets the creation date and time of a directory.

  A structure that is set to the creation date and time for the specified directory. This value is expressed in local time.

  The path of the directory. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime ``

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  If the directory described in the parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).

  Use this method to get the creation time for a directory based on Coordinated Universal Time (UTC).

  Gets the creation date and time, in Coordinated Universal Time (UTC) format, of a directory.

  A structure that is set to the creation date and time for the specified directory. This value is expressed in UTC time.

  The path of the directory.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String The caller does not have the required permission. Requires permission to access path information for the current directory. See The caller does not have the required permission.

  The current directory is distinct from the original directory, which is the one from which the process was started.

  For a list of common I/O tasks, see Common I/O Tasks.

  Gets the current working directory of the application.

  A string that contains the path of the current working directory, and does not end with a backslash (\).

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` is . The caller does not have the required permission. is a zero-length string, contains only white space, or contains implementation-specific invalid characters. was not found. The length of or the absolute path information for exceeds the system-defined maximum length. is a file name. Requires permission to access path information for the specified directory and its subdirectories. See . The caller does not have the required permission.

  This method is identical to with the asterisk (*) specified as the search pattern, so it returns all subdirectories.If you need to search subdirectories, use the method, which enables you to specify a search of subdirectories with the parameter.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The 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 .

  The names returned by this method are prefixed with the directory information provided in .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of subdirectories (including their paths) in the specified directory.

  An array of the full names (including paths) of subdirectories in the specified path, or an empty array if no directories are found.

  The relative or absolute path to the directory to search. This string is not case-sensitive. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` `` oris . The caller does not have permission to access the requested information.

  is a zero-length string, contains only white space, or contains implementation-specific invalid characters.

  does not contain a valid pattern.

  was not found. The length of or the absolute path information for exceeds the system-defined maximum length. is a file name. Requires permission to access path information for the specified directory and its subdirectories. See . The caller does not have permission to access the requested information.

  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 parameter, this method returns an empty array. Only the top directory is searched. If you want to search the subdirectories as well, use the method and specify in the parameter.

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  The 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 .

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of subdirectories (including their paths) that match the specified search pattern in the specified directory.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters (see Remarks), but doesn't support regular expressions. 0
- Method
  2.0.0.0
  4.0.0.0
  System.String[] `` `` ``

  The 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 .

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of subdirectories in . This parameter can contain a combination of valid literal and wildcard characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

  is . The caller does not have the required permission. The length of or the absolute path information for exceeds the system-defined maximum length. Requires permission to access path information for the specified file or directory. See

  The following example demonstrates the method.

  `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); } } }`

  The output is

  Path: \ecmatest\examples\pathtests.txt Directory Root is C:\

  Path: pathtests.xyzzy Directory Root is C:\

  Path: \ Directory Root is C:\

  Path: C:\ Directory Root is C:\

  Path: \\myserver\myshare\foo\bar\baz.txt Directory Root is \\myserver\myshare

  The caller does not have the required permission.

  This method obtains the fully qualified path name of , as returned by , and returns root directory information. The specified path is not required to exist.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the volume information, root information, or both for the specified path.

  A string that contains the volume information, root information, or both for the specified path.

  The path of a file or directory. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] ``

  is null.

  path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

  was not found. is a file name. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to access path information for the specified directory and the files in that directory. See . The caller does not have the required permission.

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The returned file names are appended to the supplied parameter.

  This method is identical to with the asterisk (*) specified as the search pattern.

  The 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 .

  The order of the returned file names is not guaranteed; use the method if a specific sort order is required.

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of files (including their paths) in the specified directory.

  An array of the full names (including paths) for the files in the specified directory, or an empty array if no files are found.

  The relative or absolute path to the directory to search. This string is not case-sensitive. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` `` or is .

  is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

  -or-

  does not contain a valid pattern.

  is an existing file name. The caller does not have the required permission. was not found. The length of or the absolute path information for exceeds the system-defined maximum length. Requires permission to access path information for the specified directory and the files in that directory. See The caller does not have the required permission.

  The returned file names are appended to the supplied parameter and the order of the returned file names is not guaranteed; use the method if a specific sort order is required.

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  When you use the asterisk wildcard character in a such as "*.txt", the number of characters in the specified extension affects the search as follows:

  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".

  In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".

  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.

  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".

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of files (including their paths) that match the specified search pattern in the specified directory.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. 0
- Method
  2.0.0.0
  4.0.0.0
  System.String[] `` `` ``

  The returned file names are appended to the supplied parameter and the order of the returned file names is not guaranteed; use the method if a specific sort order is required.

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  When you use the asterisk wildcard character in a such as "*.txt", the number of characters in the specified extension affects the search as follows:

  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".

  In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".

  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.

  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".

  The and methods differ as follows: When you use , you can start enumerating the collection of names before the whole collection is returned; when you use , 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, can be more efficient.

  The file names include the full path.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  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.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of files in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` is . is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. The caller does not have the required permission. was not found. The length of or the absolute path information for exceeds the system-defined maximum length. is a file name. Requires permission to access path information for the specified directory. See The caller does not have the required permission.

  The order of the returned file and directory names is not guaranteed; use the method if a specific sort order is required.

  The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , 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, can be more efficient.

  This method is identical to with the asterisk (*) specified as the search pattern.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the names of all files and subdirectories in a specified path.

  An array of the names of files and subdirectories in the specified directory, or an empty array if no files or subdirectories are found.

  The relative or absolute path to the directory to search. This string is not case-sensitive. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[] `` `` or is .

  is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

  -or-

  does not contain a valid pattern.

  The caller does not have the required permission. was not found. The length of or the absolute path information for exceeds the system-defined maximum length. is a file name. Requires permission to access path information for the specified directory. See The caller does not have the required permission.

  The order of the returned file and directory names is not guaranteed; use the method if a specific sort order is required.

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  When you use the asterisk wildcard character in a such as "*.txt", the number of characters in the specified extension affects the search as follows:

  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".

  In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".

  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.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns an array of file names and directory names that that match a search pattern in a specified path.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of file and directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. 0
- Method
  4.0.0.0
  System.String[] `` `` ``

  The order of the returned file and directory names is not guaranteed; use the method if a specific sort order is required.

  can be a combination of literal and wildcard characters, but doesn't support regular expressions. The following wildcard specifiers are permitted in .

  Wildcard specifier

  Matches

  * (asterisk)

  Zero or more characters in that position.

  ? (question mark)

  Zero or one character in that position.

  Characters other than the wildcard are literal characters. For example, the string "*t" searches for all names in ending with the letter "t". The string "s*" searches for all names in beginning with the letter "s".

  cannot end in two periods ("..") or contain two periods ("..") followed by or , nor can it contain any invalid characters. You can query for invalid characters by using the method.

  When you use the asterisk wildcard character in a such as "*.txt", the number of characters in the specified extension affects the search as follows:

  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".

  In all other cases, the method returns files that exactly match the specified extension. For example, "*.ai" returns "file.ai" but not "file.aif".

  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.

  The and methods differ as follows: When you use , you can start enumerating the collection of entries before the whole collection is returned; when you use , 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, can be more efficient.

  You can specify relative path information with the parameter. Relative path information is interpreted as relative to the current working directory, which you can determine by using the method.

  Returns an array of all the file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.

  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.

  The relative or absolute path to the directory to search. This string is not case-sensitive. The search string to match against the names of files and directories in . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. One of the enumeration values that specifies whether the search operation should include only the current directory or should include all subdirectories.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . The specified path was not found. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to read the specified file or directory. See . The caller does not have the required permission.

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  This method is identical to .

  If the directory described in the 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.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the date and time the specified file or directory was last accessed.

  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.

  The file or directory for which to obtain access date and time information. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime ``

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  If the directory described in the parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last accessed.

  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.

  The file or directory for which to obtain access date and time information.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . The specified path was not found. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to read the specified file or directory. See . The caller does not have the required permission.

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  If the directory described in the 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.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the date and time the specified file or directory was last written to.

  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.

  The file or directory for which to obtain modification date and time information. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime ``

  This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by the operating system.

  If the directory described in the parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).

  For a list of common I/O tasks, see Common I/O Tasks.

  Returns the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last written to.

  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.

  The file or directory for which to obtain modification date and time information.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String[]

  GetLogicalDrives returns all of the accessible drives on a particular machine, including the floppy drive and any optical drives.

  For a list of common I/O tasks, see Common I/O Tasks.

  Retrieves the names of the logical drives on this computer in the form "<drive letter>:\".

  The logical drives on this computer.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.DirectoryInfo ``

  The 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 .

  Trailing spaces are removed from the end of the parameter before getting the directory.

  The string returned by this method consists of all characters in the path up to, but not including, the last or . For example, passing the path "C:\Directory\SubDirectory\test.txt" to 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".

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Retrieves the parent directory of the specified path, including both absolute and relative paths.

  The parent directory, or null if is the root directory, including the root of a UNC server or share name.

  The path for which to retrieve the parent directory.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` or is a zero-length string, contains only white space, or contains implementation-specific invalid characters. or is . The caller does not have the required permission.

  An attempt was made to move a directory to a different volume,

  -or-

  already exists.

  -or-

  and refer to the same file or directory.

  was not found. The length or absolute path information for or exceeds the system-defined maximum length. Requires permission to read from and write to and . See , . The caller does not have the required permission.

  This method creates a new directory with the name specified by and moves the contents of to the newly created destination directory. If you try to move a directory to a directory that already exists, an 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 parameter, provided that "mydir" does not exist under "c:\\public", or specify a new directory name such as "c:\\newdir".

  The and 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 .

  Trailing spaces are removed from the end of the path parameters before moving the directory.

  For a list of common I/O tasks, see Common I/O Tasks.

  Moves a file or a directory and its contents to a new location.

  The path of the file or directory to move. The path to the new location for . If is a file, then must also be a file name. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method applies access control list (ACL) entries to a file that represents the noninherited ACL list.

  The ACL specified for the parameter replaces the existing ACL for the directory. To add permissions for a new user, use the method to obtain the existing ACL and modify it.

  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 ACL Technology Overview and How to: Add or Remove an Access Control List Entry.

  The method persists only objects that have been modified after object creation. If a object has not been modified, it will not be persisted to a file. Therefore, it is not possible to retrieve a object from one file and reapply the same object to another file.

  To copy ACL information from one file to another:

  Use the method to retrieve the object from the source file.

  Create a new object for the destination file.

  Use the or method of the source object to retrieve the ACL information.

  Use the or method to copy the information retrieved in step 3 to the destination object.

  Set the destination object to the destination file using the method.

  In NTFS environments, and are granted to the user if the user has rights on the parent folder. To deny and , deny on the parent directory.

  Applies access control list (ACL) entries described by a object to the specified directory.

  A directory to add or remove access control list (ACL) entries from. A object that describes an ACL entry to apply to the directory described by the parameter.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. specifies a value outside the range of date/times permitted for this operation. is . was not found. An I/O error occurred while performing the operation. The length of or the absolute path information for exceeds the system-defined maximum length. Requires permission to write to the specified file or directory. See . The caller does not have the required permission.

  The 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 .

  The parameter is not case-sensitive.

  Sets the creation date and time for the specified file or directory.

  The file or directory for which to set the creation date and time information. The date and time the file or directory was last written to. This value is expressed in local time. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Sets the creation date and time, in Coordinated Universal Time (UTC) format, for the specified file or directory.

  The file or directory for which to set the creation date and time information. The date and time the directory or file was created. This value is expressed in local time.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . was not found. An I/O error occurred while performing the operation. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission to access unmanaged code.

  When the application terminates, the working directory is restored to its original location (the directory where the process was started).

  The 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 .

  Trailing spaces are removed from the end of the parameter before setting the directory.

  The parameter is not case-sensitive.

  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 property.

  Sets the application's current working directory to the specified directory.

  The path to which the current working directory is set. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . An I/O error occurred while performing the operation. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to write to the specified file or directory. See . specifies a value outside the range of date/times permitted for this operation. was not found. The caller does not have the required permission.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Sets the date and time the specified file or directory was last accessed.

  The file or directory for which to set the access date and time information. An object that contains the value to set for the access date and time of . This value is expressed in local time. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Sets the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last accessed.

  The file or directory for which to set the access date and time information. An object that contains the value to set for the access date and time of . This value is expressed in UTC time.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters. is . An I/O error occurred while performing the operation. The length of or the absolute path information for exceeds the system-defined maximum length. The caller does not have the required permission. Requires permission to write to the specified file. See . specifies a value outside the range of date/times permitted for this operation. was not found. The caller does not have the required permission.

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Sets the date and time a directory was last written to.

  The path of the directory. The date and time the directory was last written to. This value is expressed in local time. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The 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 .

  The parameter is not case-sensitive.

  For a list of common I/O tasks, see Common I/O Tasks.

  Sets the date and time, in Coordinated Universal Time (UTC) format, that a directory was last written to.

  The path of the directory. The date and time the directory was last written to. This value is expressed in UTC time.
0