// $Id: PreCacheFile.hh 5032 2006-01-11 18:57:34Z m9710797 $ #ifndef PRECACHEFILE_HH #define PRECACHEFILE_HH #include "Thread.hh" #include namespace openmsx { class FileBase; /** * Read the complete file once and discard result. Hopefully the file * sticks in the OS cache. Mainly useful to avoid CDROM spinups or to * speed up real floppy disk (/dev/fd0) reads. */ class PreCacheFile : private Runnable { public: explicit PreCacheFile(const std::string& name); private: // Runnable virtual void run(); const std::string name; Thread thread; }; } // namespace openmsx #endif