Does anyone know how to get around Windows' cached writes without turning off caching for the entire hard drive? In Linux I can use select() or poll() to wait until the file is ready for reading or writing. It looks like Windows has select() for sockets, but will it work for files? Or is there some other function I can use to wait on a file whose contents haven't been written to disk yet?