Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-04

FlushBuffers of FileStream

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Roland Turcan

Hello FPC-Pascal users discussions!

I have used this Delphi/Kylix3 this code for flushing of buffers in my own stream descendant

{$IFDEF WIN32}
  FlushFileBuffers (Handle);
{$ELSE}
  fdatasync (Handle);
{$ENDIF}

I have found in linux.pp calling of fdatesync, but ...

How to flush buffers in Mac OS X?

Thanks.

Reply by email

Marco van de Voort
to Roland Turcan: Hello FPC-Pascal users discussions! I have used this Delphi/Kylix3 this code for flushing…

In our previous episode, Roland Turcan said:
[ Charset windows-1250 unsupported, converting... ]

Show quoted text 14 lines
Hello FPC-Pascal users discussions! I have used this Delphi/Kylix3 this code for flushing of buffers in my own stream descendant {$IFDEF WIN32} FlushFileBuffers (Handle); {$ELSE} fdatasync (Handle); {$ENDIF} I have found in linux.pp calling of fdatesync, but ... How to flush buffers in Mac OS X?

baseunix.Fpfsync .

fdatasync is just a newer "lighter" version of that, but not unices support it yet. FreeBSD doesn't have it either, which is why it is in the OS specific unit Linux.

Reply by email