Is leveraging custom protocols to specify different data sources a bad idea? #1529
-
I'm working on a file storage library for work, and I'm trying to abstract out the underlying file storage layer a bit.
I got a proof of concept working with anonymous classes which works with the protocol registry. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I have absolutely no problem for you using the registry in this way. You might also be interested in the ReferenceFileSystem ("reference://") which provides a similar redirection: every path maps to some other file, part of a file or concrete data. We also have the prefixFS ("dir://") which allows you to add a prefix to every URL for arbitrary backend. You sound like you want something just inbetween these two choices. |
Beta Was this translation helpful? Give feedback.
I have absolutely no problem for you using the registry in this way.
You might also be interested in the ReferenceFileSystem ("reference://") which provides a similar redirection: every path maps to some other file, part of a file or concrete data. We also have the prefixFS ("dir://") which allows you to add a prefix to every URL for arbitrary backend. You sound like you want something just inbetween these two choices.