Click or drag to resize
Directory Class
Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  System.IODirectory

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static class Directory

The Directory type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreateDirectory(String)
Creates all directories and subdirectories in the specified path.
Public methodStatic memberCreateDirectory(String, DirectorySecurity)
Creates all the directories in the specified path, applying the specified Windows security.
Public methodStatic memberExists
Determines whether the given path refers to an existing directory on disk.
Public methodStatic memberGetDirectories(String)
Gets the names of subdirectories (including their paths) in the specified directory.
Public methodStatic memberGetDirectories(String, String)
Gets an array of directories (including their paths) that match the specified search pattern in the current directory.
Public methodStatic memberGetDirectories(String, String, SearchOption)
Gets the names of the directories (including their paths) that match the specified search pattern in the current directory, and optionally searches subdirectories.
Public methodStatic memberGetFiles(String)
Returns the names of files (including their paths) in the specified directory.
Public methodStatic memberGetFiles(String, String)
Returns the names of files (including their paths) that match the specified search pattern in the specified directory.
Public methodStatic memberGetFiles(String, String, SearchOption)
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.
Top
See Also