31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.13 Filesystem operation functions [fs.op.funcs]

31.12.13.23 Is regular file [fs.op.is.regular.file]

bool filesystem::is_regular_file(file_status s) noexcept;
Returns: s.type() == file_type​::​regular.
bool filesystem::is_regular_file(const path& p);
Returns: is_regular_file(status(p)).
Throws: filesystem_error if status(p) would throw filesystem_error.
bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
Effects: Sets ec as if by status(p, ec).
[Note 1: 
file_type​::​none, file_type​::​not_found and file_type​::​unknown cases set ec to error values.
To distinguish between cases, call the status function directly.
— end note]
Returns: is_regular_file(status(p, ec)).
Returns false if an error occurs.