www.delorie.com/djgpp/doc/libc/libc_331.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_flush_disk_cache

Syntax

 
#include <io.h>

void _flush_disk_cache (void);

Description

Attempts to update the disk with the data cached in the write-behind disk caches (such as SmartDrv and the built-in Windows 95 disk cache).

Note that this does not flush the DOS buffers. You need to call fsync (see section fsync) or close (see section close) to force DOS to commit the file data to the disk; sync (see section sync) does that for all open files, and also calls _flush_disk_cache.

Return Value

None.

Portability

ANSI/ISO C No
POSIX No

Example

 
  /* Make sure all cached data for a handle FD is actually
     written to disk.  */
  fsync (fd);
  _flush_disk_cache ();

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004