FileSystem.CreateDirectory(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a directory.
public:
static void CreateDirectory(System::String ^ directory);
public static void CreateDirectory (string directory);
static member CreateDirectory : string -> unit
Public Shared Sub CreateDirectory (directory As String)
Parameters
- directory
- String
Name and location of the directory.
Exceptions
The directory name is malformed. For example, it contains illegal characters or is only white space.
directory
is Nothing
or an empty string.
The directory name is too long.
The directory name is only a colon (:).
The parent directory of the directory to be created is read-only.
The user does not have permission to create the directory.
Examples
This example creates the directory, NewDirectory
, in C:\Documents and Settings\All Users\Documents
.
My.Computer.FileSystem.CreateDirectory(
"C:\Documents and Settings\All Users\Documents\NewDirectory")
Remarks
If the directory already exists, no exception is thrown.
The following table lists an example of a task involving the My.Computer.FileSystem.CreateDirectory
method.
To | See |
---|---|
Create a directory | How to: Create a Directory in Visual Basic |
Applies to
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για