crossplatform FlushFileBuffers?
Original Reporter info from Mantis: cdcd
-
Reporter name: Oleg
Original Reporter info from Mantis: cdcd
- Reporter name: Oleg
Description:
i found an interesting code to crossplatform flush file buffer. This can be used to make a Linux-version of FlushFileBuffers.
function FileFlush(Handle: THandle): Boolean;
{$IFDEF MSWINDOWS}
begin
Result:= FlushFileBuffers(Handle);
end;
{$ELSE}
begin
Result:= (fpfsync(Handle) = 0);
end;
{$ENDIF}
So why not define a function
function FlushFileBuffers(Handle: THandle): Boolean;
begin
Result:= (fpfsync(Handle) = 0);
end;
for Linux?
Mantis conversion info:
- Mantis ID: 15824
- Fixed in revision: 37135 (#b6824290)