windows - Watch drive or folder for writes/changes? -
i application informed when file copied, created/written to, deleted, moved, etc. i'd on drive or folders. how do on windows?
your first port of call should filesystemwatcher
class.
you tell folders want watch, , want watch - creations, deletions, changes, etc.
be warned however, in time takes event raised , handled application contents of folder may have changed again should use event guide something has happened interested in , check contents of folder make sure process things correctly.
another thing bear in mind that, pointed out in this blog, file created event fired @ start of creation process, not end. means if have large file need able either wait created or cope partial file.
Comments
Post a Comment