FileSystemProxy.DirectoryExists(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.
Returns True
if the specified directory exists.
public:
bool DirectoryExists(System::String ^ directory);
public bool DirectoryExists (string directory);
member this.DirectoryExists : string -> bool
Public Function DirectoryExists (directory As String) As Boolean
Parameters
- directory
- String
Path of the directory.
Returns
True
if the directory exists; otherwise False
.
Examples
This example determines whether the directory C:\backup\logs
exists and checks its properties.
If My.Computer.FileSystem.DirectoryExists("C:\backup\logs") Then
Dim logInfo = My.Computer.FileSystem.GetDirectoryInfo(
"C:\backup\logs")
End If
Applies to
See also
Bekerjasama dengan kami di GitHub
Sumber untuk kandungan ini boleh didapati di GitHub, di mana anda juga boleh mencipta dan menyemak isu dan menarik permintaan. Untuk maklumat lanjut, lihat panduan penyumbang kami.