Click or drag to resize

DirectoryInfo Methods

The DirectoryInfo type exposes the following members.

Methods
 NameDescription
Public methodCreate Create the current directory.
Public methodCode exampleCreateSubdirectory Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the DirectoryInfo class.
Public methodDelete Delete the current directory.
(Overrides FileSystemInfoDelete)
Public methodCode exampleDelete(Boolean) Deletes this instance of a DirectoryInfo, specifying whether to delete subdirectories and files.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetDirectories Return the subdirectories of the current instance.
Public methodGetDirectories(String) Return the subdirectories of the current instance that match the specified search pattern.
Public methodGetFiles Return the files of the current directory.
Public methodGetFiles(String) Return the files of the current directory that match the specified search pattern.
Public methodCode exampleGetFileSystemInfos Returns an array of strongly typed FileSystemInfo entries representing all the files and subdirectories in a directory.
Public methodCode exampleGetFileSystemInfos(String) Retrieves an array of strongly typed FileSystemInfo objects representing the files and subdirectories matching the specified search criteria.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodMoveTo Moves the specified directory and contents to the destination location.
Public methodRefresh Refreshes the state of the object.
(Overrides FileSystemInfoRefresh)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also