atom-archive / xray

An experimental next-generation Electron-based text editor
MIT License
8.48k stars 235 forks source link

[Memo] There is no API to undelete a file. #150

Open probablycorey opened 5 years ago

probablycorey commented 5 years ago

I don’t think it’s possible to undo a file deletion. Would it be possible to let users do something like that?

as-cii commented 5 years ago

We think this should already be possible by calling rename and specifying the old parent id and name. You could try that in the short term, but it might be more convenient and discoverable for us to add a method that offers this under a name like undelete.

probablycorey commented 5 years ago

I got it working with the rename strategy. It is a little weird and I think an undelete method would make the code clearer, but it all works for now!

probablycorey commented 5 years ago

@as-cii In v0.5.0 the renaming strategy doesn't work anymore. Looks like it might be time for an an API call!