Freigeben über


is_directory Function

Indicates whether the specified file_status or file name represents a directory.

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

Parameters

  • Stat
    A file_status object.

  • Pval
    A Path object. Path can be either a basic_path or a type that's derived from basic_path.

Return Value

The first function returns Stat.type() == directory_file. The second function returns is_directory(status(Pval)).

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

file_type Enumeration

status Function

Other Resources

C++ Standard Library Header Files