FileSystemProxy.DirectoryExists(String) Methode

Definitie

Retourneert True als de opgegeven map bestaat.

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

Pad van de map.

Retouren

True als de map bestaat; anders False.

Voorbeelden

In dit voorbeeld wordt bepaald of de map C:\backup\logs bestaat en de eigenschappen ervan worden gecontroleerd.

If My.Computer.FileSystem.DirectoryExists("C:\backup\logs") Then
    Dim logInfo = My.Computer.FileSystem.GetDirectoryInfo(
        "C:\backup\logs")
End If

Van toepassing op

Zie ook