Share via


DirectoryInfo Members

The following tables list the members exposed by the DirectoryInfo type.

Public Constructors

Name Description
Public Method DirectoryInfo Initializes a new instance of the DirectoryInfo class on the specified path.

Public Properties

Name Description
Public Property Exists Specifies whether this directory already exists.
Public Property Name Gets the name of this DirectoryInfo instance.
Public Property Parent Gets the parent directory of a specified subdirectory.
Public Property Root Gets the root portion of a path.

Public Methods

Name Description
Public Method Create Creates a directory.
Public Method CreateSubdirectory Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the DirectoryInfo class.
Public Method Delete Deletes this instance of a DirectoryInfo, specifying whether to delete subdirectories and files.
Public Method GetDirectories Returns an array of directories in the current DirectoryInfo matching the given search criteria.
Public Method GetFiles Returns a file list from the current directory matching the given searchPattern.
Public Method MoveTo Moves a DirectoryInfo instance and its contents to a new path.
Public Method ToString Returns the original path that was passed by the user.

See Also

Reference

DirectoryInfo Class
System.IO Namespace