FileSystem.MkDir(String) Método

Definição

Cria um novo diretório.Creates a new directory. O recurso My oferece melhor produtividade e desempenho em operações de E/S do arquivo do que MkDir.The My feature gives you better productivity and performance in file I/O operations than MkDir. Para obter mais informações, consulte CreateDirectory(String).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)

Parâmetros

Path
String

Obrigatórios.Required. Uma expressão de cadeia de caracteres que identifica o diretório a ser criado.A string expression that identifies the directory to be created. O Path pode incluir a unidade.The Path may include the drive. Se nenhuma unidade for especificada, MkDir criará um novo diretório na unidade atual.If no drive is specified, MkDir creates the new directory on the current drive.

Exceções

Path não foi especificado ou está vazio.Path is not specified or is empty.

Permissão negada.Permission denied.

O diretório já existe.Directory already exists.

Exemplos

Este exemplo usa a MkDir função para criar um diretório.This example uses the MkDir function to create a directory. Se a unidade não for especificada, o novo diretório será criado na unidade atual.If the drive is not specified, the new directory is created on the current drive.

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

Comentários

Essa função cria um novo diretório.This function creates a new directory.

Aplica-se a

Confira também