I'm using a virtual file system (PhysFS) in my application. Is there any way to redirect all file 开发者_JAVA技巧reading and writing through this virtual file system? I would like everything to be redirected, such that even third-party libraries go through this file system.
Is there something similar to rdbuf
, but for all file IO, both though C++ streams and the old C FILE
objects?
Edit: OS dependent
The platform I'm currently interested in is Windows, so I'd like to know how this can be don with the WinAPI. Also, is file redirection a common feature of OSes?
Only through an operating-system specific API, you might be able to.
精彩评论