is_empty Function

Indicates whether a specified path refers to an empty file or empty directory.

template<class Path>
inline bool is_empty(
   const Path& Pval
);

Pval

A Path object. Path can be either a basic_path or a type that is derived from basic_path.

If Pval refers to an existing directory, the function returns basic_directory_iterator<Path>(Pval) == basic_directory_iterator<Path>().

If Pval refers to an existing file, the function returns file_size(Pval) == 0.

If Pval refers to a path that does not exist, the function throws a basic_filesystem_error.

Header: filesystem

Namespace: std::tr2::sys

Show: