dbxcli
dbxcli copied to clipboard
List deleted files and possibly recover them
Currently I can only restore a file if I know its revision.
But imagine that somehow a bunch of files got deleted and I didn't got their revision or their name, so I'd like to recovery all those deleted files.
I think I could figure out a solution if somehow I could list deleted files, so would that be possible?
@gustavo-momente this should be easy to implement!
The list_folders API already has a include_deleted flag (defaults to False). So you'd need to introduce an option to set that. See https://godoc.org/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files#ListFolderArg
Once you have a path for a deleted file, restoring should be simple too. See https://www.dropbox.com/developers/documentation/http/documentation#files-restore and https://godoc.org/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files#Client
Feel free to submit a PR!