Share via


exists 함수

Specifies whether a file exists.

inline bool exists(
   file_status Stat
);
template<class Path>
inline bool exists(
   const Path& Pval
);

매개 변수

  • Stat
    A file_status object.

  • Pval
    Path 개체 Path 는 basic_path 또는 basic_path에서 파생된 형식 중 하나일 수 있습니다.

반환 값

The first function returns status_known(Stat) && Stat.type() != file_not_found.

The second function returns exists(status(Pval)).

설명

A file_status represents an existing file if the underlying file_type is known

요구 사항

헤더: filesystem

Namespace: std::tr2::sys

참고 항목

참조

<filesystem>

status_known 함수

status 함수

file_type 열거형

기타 리소스

C++ 표준 라이브러리 헤더 파일