How to “safely” delete folder into Recycle Bin

后端 未结 2 535
自闭症患者
自闭症患者 2020-12-10 14:34

I\'m looking for a way to put a folder (with subfolders) into a Recycle Bin with these conditions:

  1. It must be done silently -- without any

2条回答
  •  -上瘾入骨i
    2020-12-10 15:27

    I was able to come up with a solution to all 3 of my original points/requests.

    In a nutshell, one needs to use the IFileOperation interface and implement IFileOperationProgressSink in it.

    Here's full code sample and explanation for that.

    EDIT: Ok, there's more to it. The method I posted above doesn't cover all bases :(

提交回复
热议问题