Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::experi...egular_file(3)  C++ Standard Libary std::experi...egular_file(3)

NAME
       std::experimental::filesystem::is_regular_file	  -    std::experimen-
       tal::filesystem::is_regular_file

Synopsis
	  Defined in header <experimental/filesystem>
	  bool is_regular_file(	file_status s );		 (1) (filesys-
       tem TS)
	  bool is_regular_file(	const path& p );		 (2) (filesys-
       tem TS)
	  bool is_regular_file(	const path& p, error_code& ec ); (3) (filesys-
       tem TS)

	  Checks if the	given file status or path  corresponds	to  a  regular
       file.

	  1) Equivalent	to s.type() == file_type::regular.
	  2) Equivalent	to is_regular_file(status(p)).
	  3)  Equivalent  to is_regular_file(status(p, ec)). Returns false and
       sets ec to an
	  appropriate error code if an error occurs. Otherwise,	ec is  cleared
       with a call to
	  ec.clear().

	   This	section	is incomplete
	   Reason:  the	specification says that	(2) throws filesystem_error if
       status(p) would
	   throw  filesystem_error.  This  is  different  from	the  rest   of
       is_**_file functions. Is
	   that	correct	and if yes, what's the rationale?

Parameters
	  s  - file status to check
	  p  - path to examine
	  ec - error code to store the error status to

Return value
	  true if the given path or file status	corresponds to a regular link,
       false
	  otherwise.

Exceptions
	  1,3)
	  noexcept specification:
	  noexcept
	  2)  Throws  filesystem_error	if  an error occurs. The error is con-
       structed	with p as an
	  argument. The	error code is set to an	appropriate error code for the
       error that
	  caused the failure.

See also
	   This	section	is incomplete

http://cppreference.com		  2022.07.31	  std::experi...egular_file(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::filesystem::is_regular_file&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help