This documentation is archived and is not being maintained.

exists Function

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

A Path object. Path can be either a basic_path or a type that is derived from 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

Header: filesystem

Namespace: std::tr2::sys

Show: