FileSystemProxy.DirectoryExists(String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne True si le répertoire spécifié existe.
public:
bool DirectoryExists(System::String ^ directory);
public bool DirectoryExists(string directory);
member this.DirectoryExists : string -> bool
Public Function DirectoryExists (directory As String) As Boolean
Paramètres
- directory
- String
Chemin d’accès du répertoire.
Retours
True si le répertoire existe ; sinon False.
Exemples
Cet exemple détermine si le répertoire C:\backup\logs existe et vérifie ses propriétés.
If My.Computer.FileSystem.DirectoryExists("C:\backup\logs") Then
Dim logInfo = My.Computer.FileSystem.GetDirectoryInfo(
"C:\backup\logs")
End If