How can I implement “recycle bin” functionality?

前端 未结 3 1480
无人及你
无人及你 2021-01-18 15:00

I am working on a Java desktop application in which I need to implement recycle bin functionality. Currently:

  1. I copy a file using my desktop application to a f
3条回答
  •  暖寄归人
    2021-01-18 15:18

    Whenever there is need to move a file to recycle bin,

    1. Rename it with a key and store it in the recycle bin folder,
    2. Also map this key with the location of the file in your text file.

    Now when user asks for restore, get the exact location from txt using the key and restore it.

提交回复
热议问题