Here is the problem: I am tracking the directory using the Win32 API ReadDirectoryChangesW . And I need to distinguish between newly created files and modified files. But there are problems ... as always :(
Cases:
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE
FILE_NOTIFY_CHANGE_FILE_NAME
FILE_NOTIFY_CHANGE_SIZE
Of course, I applied some workarounds. But I want to know if there is any elegant way to solve the problems that I described.
Thanks in advance!
You must catch FILE_NOTIFY_CHANGE_LAST_WRITE, not FILE_NOTIFY_CHANGE_SIZE, for the modified file. Files can be resized without resizing.
FILE_NOTIFY_CHANGE_LAST_WRITE
, , , 1-2 . , , , , .
ReadDirectoryChanges winapi. , ; , FILE_NOTIFY_CHANGE_LAST_WRITE , , , , . , , .
ReadDirectoryChanges
Source: https://habr.com/ru/post/1770610/More articles:Object structure: deleting but saving the graph of objects - entity-frameworkПредварительная выделенная память .NET vs ad-hoc - garbage-collectionhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1770607/how-to-modify-a-git-repositorys-history-to-show-contents-were-imported-from-another-repository&usg=ALkJrhhQ1ZqiCVmDMs_JWYW6YDO7CzeIywEmulating! = In scala using <> - scalaHTML3 validated by W3C (Work in Chrome, Firefox, Safari) Black screen in IE8 - cssQuestion about polymorphism and overload - javaJersey Static Content Filtering - jerseyИзмените высоту тона (и скорость) звука во время воспроизведения в Python - pythonCreating a Winforms 2.0 Splash Screen - c #How to enable SQL CE using the WiX installer? - sql-server-ceAll Articles