[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RFC: svn_io_file_flush_to_disk

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-05-01 18:12:18 CEST

D.J. Heap wrote:

> Josh Pieper wrote:
>
>> Branko ??ibej wrote:
>
> [snip]
>
> It would be something like:
>
> if (!FlushFileBuffers (filehand))
> {
> return svn_error_wrap_apr (apr_get_os_error (),
> "Can't flush '%s'",
> file_name);
> }
>

 From the documentation:

FlushFileBuffers

Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error
information, call GetLastError.

The function fails if hFile is a handle to console output. That is
because console output is not buffered. The function returns FALSE, and
GetLastError returns ERROR_INVALID_HANDLE.

Windows Me/98/95: The function does nothing if hFile is a handle to
console output. That is because console output is not buffered. The
function returns TRUE, but it does nothing.

but i guess you weren't going to use the flush on console output anyway ;-)
c.a.t.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 1 18:12:29 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.