Export (0) Print
Expand All

Directory Methods

The methods of the Directory class are listed here. For a complete list of Directory class members, see the Directory Members topic.

Public Methods

public methodstatic (Shared in Visual Basic)CreateDirectory

Supported by the .NET Compact Framework.

Creates all directories and subdirectories as specified by path.
public methodstatic (Shared in Visual Basic)Delete

Supported by the .NET Compact Framework.

Overloaded. Deletes a directory and its contents.
public methodstatic (Shared in Visual Basic)Exists

Supported by the .NET Compact Framework.

Determines whether the given path refers to an existing directory on disk.
public methodstatic (Shared in Visual Basic)GetCreationTime

Supported by the .NET Compact Framework.

Gets the creation date and time of a directory.
public methodstatic (Shared in Visual Basic)GetCreationTimeUtc Gets the creation date and time, in coordinated universal time (UTC) format, of a directory.
public methodstatic (Shared in Visual Basic)GetCurrentDirectory

Supported by the .NET Compact Framework.

Gets the current working directory of the application.
public methodstatic (Shared in Visual Basic)GetDirectories

Supported by the .NET Compact Framework.

Overloaded. Gets the names of subdirectories in the specified directory.
public methodstatic (Shared in Visual Basic)GetDirectoryRoot

Supported by the .NET Compact Framework.

Returns the volume information, root information, or both for the specified path.
public methodstatic (Shared in Visual Basic)GetFiles

Supported by the .NET Compact Framework.

Overloaded. Returns the names of files in the specified directory.
public methodstatic (Shared in Visual Basic)GetFileSystemEntries

Supported by the .NET Compact Framework.

Overloaded. Returns the names of all files and subdirectories in the specified directory.
public methodstatic (Shared in Visual Basic)GetLastAccessTime

Supported by the .NET Compact Framework.

Returns the date and time the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)GetLastAccessTimeUtc Returns the date and time, in universal coordinated time (UTC) format, that the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)GetLastWriteTime

Supported by the .NET Compact Framework.

Returns the date and time the specified file or directory was last written to.
public methodstatic (Shared in Visual Basic)GetLastWriteTimeUtc Returns the date and time, in universal coordinated time (UTC) format, that the specified file or directory was last written to.
public methodstatic (Shared in Visual Basic)GetLogicalDrives Retrieves the names of the logical drives on this computer in the form "<drive letter>:\".
public methodstatic (Shared in Visual Basic)GetParent Retrieves the parent directory of the specified path, including both absolute and relative paths.
public methodstatic (Shared in Visual Basic)Move

Supported by the .NET Compact Framework.

Moves a file or a directory and its contents to a new location.
public methodstatic (Shared in Visual Basic)SetCreationTime Sets the creation date and time for the specified file or directory.
public methodstatic (Shared in Visual Basic)SetCreationTimeUtc Sets the creation date and time, in universal coordinated time (UTC) format, for the specified file or directory.
public methodstatic (Shared in Visual Basic)SetCurrentDirectory

Supported by the .NET Compact Framework.

Sets the application's current working directory to the specified directory.
public methodstatic (Shared in Visual Basic)SetLastAccessTime Sets the date and time the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)SetLastAccessTimeUtc Sets the date and time, in universal coordinated time (UTC) format, that the specified file or directory was last accessed.
public methodstatic (Shared in Visual Basic)SetLastWriteTime Sets the date and time a directory was last written to.
public methodstatic (Shared in Visual Basic)SetLastWriteTimeUtc Sets the date and time, in universal coordinated time (UTC) format, that a directory was last written to.

See Also

Directory Class | System.IO Namespace

Show:
© 2014 Microsoft