in reply to Windows equivlanet of Unix sync
Try this. No guarentees as it is quite hard to contrive a test scenario.
Adjust the drive letter in the call to createFile() to suit.
#! perl -slw use strict; use Win32API::File; ## Hacked to export everything use Win32::API::Prototype; ApiLink 'Kernel32', q[BOOL FlushFileBuffers( HANDLE hFile )] or die $^E; my $devHandle = createFile( '//./C:', 'wke' ); $devHandle == -1 and die $^E; FlushFileBuffers( $devHandle ) or die $^E;
|
|---|