NTFS: When does Windows consider the newly added file exist in the system? When the writing process starts or ends?
When it starts writing the file, it has to create it, and as soon as it's created, it exists. This perforce is true for any file system. And it really can't be any other way, because the process creating the file may actually hold it open for possibly several hours, writing into it repeatedly, before finalizing and closing it, and you don't want to have another file created with the same name while that's happening; and another process also may want to deal with it by name during that time. In Windows, it is possible to open a file in exclusive mode, so that if anyone else has the file open your open will fail; in that case, you know it's still being written and you can hold off and try again in a few seconds.