System. IO. File
System. IO. FileInfo
If (! System. IO. Directory. Exists (p) System. IO. Directory. CreateDirectory (p );
//! System. IO. Directory. Exists (p) This method first checks whether the folder Exists, where P is the path of the folder
// Get the name and assign a value before using it, for example, string p = @ "d: \ my folder ";
If (! System. IO. Directory. Exists (p ))
// Execute the following statement to create the folder.
System. IO. Directory. CreateDirectory (p );
Using System. IO;
String p = @ "d: \ my folder ";
Directory. CreateDirectory (p); // create
Directory. Delete (p); // Delete
// Using System. IO;
If (Directory. GetFiles (tmppath). Length = 0)
{
// Create a directory
Directory. CreateDirectory (tmppath );
// Delete the temporary directory
Directory. Delete (tmppath, true );
// Delete a temporary file
File. Delete (filename );
}