How do I open a directory with CreateFile in C# to examine deleted entries?

前端 未结 3 832
甜味超标
甜味超标 2021-01-01 03:00

How do I open a directory with CreateFile in C# to examine entries of deleted files? Or is it now impossible? I remember way back when being able to open a directory on an

3条回答
  •  伪装坚强ぢ
    2021-01-01 03:55

    Just to throw another approach at you, in case it's relevant, you could always just watch the directory with a FileSystemWatcher and catch the Deleted event. Of course, you'll need to be watching it at the time of deletion, but it may be a far easier solution then trying to recover it (if it's an option).

提交回复
热议问题