dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.2k stars 661 forks source link

Question: How to stop Dokany to read whole file? #1136

Closed shujaat-github closed 1 year ago

shujaat-github commented 1 year ago

I want the following MirrorReadFile function to read only first 1024 bytes from each file instead of reading whole file of several mega bytes. https://github.com/dokan-dev/dokany/blob/e115efc7db1804a18ba96af938b305b337b3f91f/samples/dokan_mirror/mirror.c#L558

How to let Dokany know and stop calling MirrorReadFile again for reading whole file?

Assume all files are at least 1024 bytes in size.

Liryna commented 1 year ago

Hi @shujaat-github ,

It not Dokan who decide how much of the file needs to be read. Dokan only forwards the requests made by the system and the applications accessing those files. You can use Procmon or use the ProcessId field in dokan info to find out who is reading the file.