다음을 통해 공유


basic_path::leaf 메서드

저장된 파일 이름을 검색합니다.

string_type leaf() const;

반환 값

이 메서드는 empty() ? string_type() : *--end()를 반환합니다.

  • 이 상대 경로 가 저장된 파일 이름의 제출한 경우, 반환 값은 마지막 패스 요소 입니다.

  • 그렇지 않고는, 루트 는 제출되고, 반환 값은 루트 입니다.

  • 그렇지 않고는, 접두사 가 있으면, 반환 값은 접두사입니다.

  • 그렇지 않으면 반환 값은 빈 string입니다.

설명

A stored file name consists of an optional prefix, followed by an optional root, followed by an optional relative path.

The prefix consists of all elements up to and including the first colon.

The root consists of one slash.

The relative path consists of one or more path elements that are delimited by sequences of slashes.

요구 사항

헤더: filesystem

네임스페이스: std::tr2::sys

참고 항목

참조

basic_path 클래스

<filesystem>