FileSystem.GetParentPath(String) 메서드

정의

제공된 경로의 부모 경로를 반환합니다.

public:
 static System::String ^ GetParentPath(System::String ^ path);
public static string GetParentPath(string path);
static member GetParentPath : string -> string
Public Shared Function GetParentPath (path As String) As String

매개 변수

path
String

검사할 경로입니다.

반품

제공된 경로의 부모 경로입니다.

예외

경로는 루트 경로이므로 부모 경로가 없습니다.

pathNothing입니다.

경로가 시스템 정의 최대 길이를 초과합니다.

경로의 파일 또는 디렉터리 이름에 콜론(:) 포함되거나 잘못된 형식입니다.

예제

이 예제에서는 에 대한 C:\Backups\Tmp\Test부모 경로를 가져옵니다.

Dim strPath = My.Computer.FileSystem.GetParentPath("C:\backups\tmp\test")
MsgBox(strPath)

설명

문자열 작업입니다. 파일 시스템을 검사하지 않습니다.

적용 대상