FileSystem.CurrentDirectory 속성

정의

현재 디렉터리를 가져오거나 설정합니다.

public:
 static property System::String ^ CurrentDirectory { System::String ^ get(); void set(System::String ^ value); };
public static string CurrentDirectory { get; set; }
static member CurrentDirectory : string with get, set
Public Shared Property CurrentDirectory As String

속성 값

파일 I/O 작업의 현재 디렉터리입니다.

예외

경로가 잘못된 경우

사용자에게 필요한 권한이 없는 경우

예제

다음은 현재 디렉터리를 반환하고 메시지 상자에 표시하는 예제입니다.

MsgBox(My.Computer.FileSystem.CurrentDirectory)

다음은 현재 디렉터리를 로 설정하는 예제입니다 C:\TestDirectory.

My.Computer.FileSystem.CurrentDirectory = "C:\TestDirectory"

설명

CurrentDirectory 는 시스템 차원의 환경 변수입니다.

적용 대상