質問

Sandboxie is a program that will let you read from the hard drive, but when you try to write back it will redirect the file to a separate container. I would like to learn how to do something similar. I do not know what terms or libraries to look for. Is there a file redirection API in windows? Is there a open source library that can help me out with the down and dirty pieces?

I know there is likely no API in windows to do this out of the box and I will likely need to write my own driver. I don't mind writing a driver, this project is to be a learning experience for me and I kind of want to learn how to do it.

Any help would be greatly appreciated.


Clarification:

I am trying to replicate the behavior of sandboxie, IE: launching a unmodified exe of another program and redirecting the way it handles file IO.

What I want to do is basically have a launcher that will turn my SSD disk in to a cache for my spinning drive. I launch my app and it in turn launches another app. Any resources the other app requests will be passed through to the spinning disk, but also copied to the SSD. Any further reads and all writes will be done to the SSD copy of the file. Once the other program closes, my app will flush the writes from the SSD back to the spinning disk.

I could technically do this through sandboxie and some scripting tricks but I want to learn the internals of file IO and how to do the redirection.


Clarification 2:

I no-longer have a issue using a prebuilt library, as long as it is free (as in beer). It does not need to be open source or free (as in speech) .

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません softwareengineering.stackexchange
scroll top