DirectoryInfo Methods

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The DirectoryInfo type exposes the following members.

Public method Create Creates a directory.
Public method CreateSubdirectory Creates a subdirectory or subdirectories on the specified path.
Public method Delete() Deletes this DirectoryInfo if it is empty. (Overrides FileSystemInfo.Delete().)
Public method Delete(Boolean) Deletes this instance of a DirectoryInfo, specifying whether to delete subdirectories and files.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetDirectories() Returns the subdirectories of the current directory.
Public method GetDirectories(String) 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.
Public method GetFiles(String) Returns a file list from the current directory matching the given searchPattern.
Public method GetFileSystemInfos() Returns an array of strongly typed FileSystemInfo entries representing all the files and subdirectories in a directory.
Public method GetFileSystemInfos(String) Retrieves an array of strongly typed FileSystemInfo objects representing the files and subdirectories matching the specified search criteria.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MoveTo Moves a DirectoryInfo instance and its contents to a new path.
Public method Refresh Refreshes the state of the object. (Inherited from FileSystemInfo.)
Public method ToString Returns the original path that was passed by the user. (Overrides Object.ToString().)

© 2015 Microsoft