Enable to determine file edit #321
-
Dear Dokan support team, But in some cases, the whole of these sets of events is not enough to determine file edit.
It looks like Excel is not throwing the SetEndOfFile event ( like .txt editors ) at the end of the whole editing operation and we are not able to determine where editing is finished to start processing the edited file. Can you provide some hints on how to determine that editing is finished (not only for the Microsoft editor's case but something very general for all types of files/ editors)? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @MagaKhachatryan , As all the activity (Create / Read / Write / SetEndOfFile) directly comes from the application manipulating the file and they are all written by different developers, there is not generic workflow on how files are edited. FYI Word (Office) use a tmp and source file replacement workflow when saving. If you catch this pattern, you can say when Office is done to apply the changes. I also believe it keeps a tmp file opened side to side to the original file while the user edits (need to confirm). |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer @Liryna very much!!! Now we do so for Word files but we have found out it doesn't work for .csv files. Thank you very much to the whole Dokan team. |
Beta Was this translation helpful? Give feedback.
Hi @MagaKhachatryan ,
As all the activity (Create / Read / Write / SetEndOfFile) directly comes from the application manipulating the file and they are all written by different developers, there is not generic workflow on how files are edited.
Maybe a better logic would be to observe the file activity and determine that after a delay of X ms / sec of no handle with previous writes activity opened, the editor is done.
FYI Word (Office) use a tmp and source file replacement workflow when saving. If you catch this pattern, you can say when Office is done to apply the changes. I also believe it keeps a tmp file opened side to side to the original file while the user edits (need to confirm).