Search code examples
c#undo-redo

How to implement undo/redo of files mapped in a treeview


Can anyone give an idea of how should I implement undo/redo of cutting/copying/pasting of files (dirs, subdirs) mapped in a treeview in C#?

It would be great to have some code samples.


Solution

  • For a quick linear undo/redo, you can use Memento pattern using zip of file as memento.