the trashbin files (folder "files_trashbin") and its respective file cache entries will already be available as part of the files export/import
the extra part that is needed is the contents of the oc_files_trash table which maps to filecache entries by file id. The table mostly contains information about where a file was originally located and is used when restoring files. If this information is missing or the source folder has disappeared, the trashbin code will simply restore all files to the root folder.
So the tasks would be:
[ ] export:
[ ] provide API in core to access the table entries by user (or cheat and access directly...)
[ ] store to JSON information in JSON blob on export based on provided info
[ ] import:
[ ] provide API in core to store entries into the table (or cheat and access directly...)
[ ] read from JSON
[ ] remap file ids
[ ] store using the above API
[ ] tests
Depending whether this information is relevant or not for customers it might be safe to skip this task altogether...
So the tasks would be:
Depending whether this information is relevant or not for customers it might be safe to skip this task altogether...