Share via


FileSystemProxy.DirectoryExists(String) 메서드

정의

지정된 디렉터리가 있으면 True를 반환합니다.

public:
 bool DirectoryExists(System::String ^ directory);
public bool DirectoryExists (string directory);
member this.DirectoryExists : string -> bool
Public Function DirectoryExists (directory As String) As Boolean

매개 변수

directory
String

디렉터리 경로입니다.

반환

디렉터리가 있으면 True이고, 그렇지 않으면 False입니다.

예제

이 예제에서는 디렉터리가 C:\backup\logs 있는지 여부를 확인하고 해당 속성을 확인합니다.

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

적용 대상

추가 정보