Dim path As String = "c:\temp\MyTest.txt" ' Create the file. Dim fs As FileStream = File.Create(path, 1024) Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") ' Delete the file if it exists. If File.Exists(path) Then File.Delete(path) End If
Dim path As String = "c:\temp\MyTest.txt" ' Create the file. Dim fs As FileStream = File.Create(path, 1024) Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") ' Delete the file if it exists. If File.Exists(path) Then File.Delete(path) End If ================================================================================ 晕,我是说创建文件夹啊 文件夹 文件夹 文件夹
DirectoryInfo di = Directory.CreateDirectory(path); Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path));
在客户端使用fso组件:ms-help://MS.MSDNQTR.2003FEB.2052/vbcn7/html/vbconIntroductionToFileSystemObjectModel.htm
' Create the file.
Dim fs As FileStream = File.Create(path, 1024)
Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") ' Delete the file if it exists.
If File.Exists(path) Then
File.Delete(path)
End If
' Create the file.
Dim fs As FileStream = File.Create(path, 1024)
Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.") ' Delete the file if it exists.
If File.Exists(path) Then
File.Delete(path)
End If
================================================================================
晕,我是说创建文件夹啊
文件夹
文件夹
文件夹
Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path));