Monitoring files - how to know when a file is complete

前端 未结 9 2058
无人及你
无人及你 2021-01-11 12:59

We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When th

9条回答
  •  死守一世寂寞
    2021-01-11 13:28

    Have you tried getting a write lock on the file? If it's being written to, that should fail, and you know to leave it alone for a bit...

提交回复
热议问题