开发者

Redirect all file reading and writing

开发者 https://www.devze.com 2023-04-07 20:34 出处:网络
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 re

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号