如何跟踪系统范围的文件操作(撤消/重做)?

时间:2023-01-31 20:14:31

When I copy/delete files from my program I can record operations and perform Undo and Redo.

当我从程序中复制/删除文件时,我可以记录操作并执行撤消和重做。

But I would like to track entire system copy/delete procedures like Explorer does, so that I can perform undo even when the delete procedure has been performed from some other process, such as Explorer.

但我想像资源管理器一样跟踪整个系统复制/删除过程,这样即使从某些其他进程(如Explorer)执行删除过程,我也可以执行撤消操作。

1 个解决方案

#1


0  

You have to use the Shellapi for that, and not the set of standard files functions of sysutils. If you copy/delete/cut with ShellExecuteEx, undo redo will be available from the explorer, even if the operation has been made within your program.

你必须使用Shellapi,而不是sysutils的标准文件函数集。如果使用ShellExecuteEx复制/删除/剪切,即使已在程序中进行了操作,也可以从资源管理器中获取撤消重做。

#1


0  

You have to use the Shellapi for that, and not the set of standard files functions of sysutils. If you copy/delete/cut with ShellExecuteEx, undo redo will be available from the explorer, even if the operation has been made within your program.

你必须使用Shellapi,而不是sysutils的标准文件函数集。如果使用ShellExecuteEx复制/删除/剪切,即使已在程序中进行了操作,也可以从资源管理器中获取撤消重做。