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

FreeBSD Manual Pages

  
 
  

home | help
std::basic_filebuf::sync(3)   C++ Standard Libary  std::basic_filebuf::sync(3)

NAME
       std::basic_filebuf::sync	- std::basic_filebuf::sync

Synopsis
	  protected:
	  virtual int sync()

	  If  a	 put area exists (e.g. the file	was opened for writing), calls
       overflow() to
	  write	all pending output to the file,	then flushes the file as if by
       calling
	  std::fflush.

	  If a get area	exists (e.g. the file was opened for reading), the ef-
       fect is
	  implementation-defined. Typical implementation may empty out the get
       area and	move
	  the current file position back by the	corresponding number of	bytes.

Parameters
	  (none)

Return value
	  0 in case of success,	-1 in case of failure.

Notes
	  sync() or its	equivalent is implicitly called	for output streams  by
       close(),
	  seekoff(), and seekpos() and explicitly called by std::basic_stream-
       buf::pubsync()

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  pubsync invokes sync()
		  (public     member	 function     of    std::basic_stream-
       buf<CharT,Traits>)
	  fflush  synchronizes an output stream	with the actual	file
		  (function)

http://cppreference.com		  2022.07.31	   std::basic_filebuf::sync(3)

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

home | help