TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

[Feature Request]: Abstract file provider interface

Open BilliAlpha opened this issue 1 year ago • 0 comments

Checklist

  • [X] I am using an up-to-date version.
  • [X] I have read the documentation.
  • [X] I have searched existing issues.

Description

As described here : https://github.com/TagStudioDev/TagStudio/pull/197#issuecomment-2351158979

It would be interesting to provide abstraction and create a generic file provider interface (with a default implementation per OS filesystem) so that we could later add support for other file systems (be it on the network, encrypted or really anything). It would allow support for S3, FTP, SSHFS, GPG encrypted files etc ...

Solution

Define a generic interface to be implemented by all file providers that provides all required methods. It could potentially aid with implementation of #295, a library could reference a list of file providers instead of directly referencing a folder.

Each provider should be able to return a list of files where each file has one or more identifiers (a path, some hashes, creation timestamp, or other custom IDs). These identifiers would link it to an entry. Then providers should also implement reading (and potentially writing) methods that could be required to render a preview/thumbnail and to view/edit metadata.

Alternatives

No response

BilliAlpha avatar Sep 14 '24 21:09 BilliAlpha