Επεξεργασία

Κοινή χρήση μέσω


FileSystem.MkDir(String) Method

Definition

Creates a new directory. The My feature gives you better productivity and performance in file I/O operations than MkDir. For more information, see CreateDirectory(String).

public:
 static void MkDir(System::String ^ Path);
public static void MkDir (string Path);
static member MkDir : string -> unit
Public Sub MkDir (Path As String)

Parameters

Path
String

Required. A string expression that identifies the directory to be created. The Path may include the drive. If no drive is specified, MkDir creates the new directory on the current drive.

Exceptions

Path is not specified or is empty.

Permission denied.

Directory already exists.

Examples

This example uses the MkDir function to create a directory. If the drive is not specified, the new directory is created on the current drive.

' Make new directory.
MkDir("C:\TESTDIR")

Remarks

This function creates a new directory.

Applies to

See also