Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to implement a custom storage? #202

Open
proninyaroslav opened this issue Dec 7, 2021 · 3 comments
Open

Is it possible to implement a custom storage? #202

proninyaroslav opened this issue Dec 7, 2021 · 3 comments

Comments

@proninyaroslav
Copy link
Contributor

libtorrent by default allows to implement custom storage https://www.libtorrent.org/reference-Custom_Storage.html. One idea is to implement a storage that works with raw file descriptors, not filesystem paths. Is it possible? This could solve some problems, for example, add support for the Android Storage Access Framework, which only provides access to file descriptors.

@proninyaroslav
Copy link
Contributor Author

Hello @aldenml. Can you comment on this, please :)

@aldenml
Copy link
Owner

aldenml commented Dec 14, 2021

Hi @proninyaroslav, sorry for the late response :)

I explored this idea in the past. The problem at that moment was that you need to provide almost a full re-implementation of the storage vs just overriding the interaction with the filesystem. The interaction with and assumption that you are in a posix-compatible system is hard to isolate.

I will keep this open to look at it again.

@proninyaroslav
Copy link
Contributor Author

That would be very nice. I think it's better than using a POSIX hack that didn't work in many cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants