There is no way to reliably detect if drive data is being copied out of a WinFsp drive to another drive using file systems. A file system implements simple Read and Write operations that do not carry a “reason” with them. When the file system receives a Read there is no way for it to know what the application performing the Read is going to use the data for. It might very well write the data to another file system.
The best you can do is apply some heuristics. For example, if an application has read more than 10 files in sequence from beginning to end it may be trying to copy the data, especially if that application is cmd.exe or explorer.exe. Of course such heuristics are brittle, they can break applications that do not copy your data and they can be easily circumvented.
A slightly better way would be to implement a filter driver that sits on top of two different drives and detects data moving across file systems. But that could easily be circumvented (e.g. an application could encrypt and pad (change the size of) the copied data when placing them on the destination drive and the filter driver would be unable to detect the copy). This is also outside the scope of WinFsp.
Bill
--
You received this message because you are subscribed to the Google Groups "WinFsp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
winfsp+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/winfsp/4c30cc5d-2b96-426b-81e2-b6824d5864a3n%40googlegroups.com.