My application is listening to directory and each new file who created need to handle with, so I did a test and listen to my folder and see that if I move big file into this folder the event fired before the whole file is created and this can cause my problem. can I wait until the all file is created ?
public void startListener(string directoryPath)
{
FileSystemWatcher watcher = new FileSystemWatcher(directoryPath);
watcher.Filter = "*.avi";
watcher.Created += watcher_Created;
watcher.EnableRaisingEvents = true;
}
void watcher_Created(object sender, FileSystemEventArgs e)
{
}