-
Notifications
You must be signed in to change notification settings - Fork 317
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
Consider refactoring ProvenanceFileStorage
#7118
Comments
sschuberth
added a commit
that referenced
this issue
Jun 14, 2023
…iles Resolves #7118. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
sschuberth
added a commit
that referenced
this issue
Jun 19, 2023
…iles Resolves #7118. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
sschuberth
added a commit
that referenced
this issue
Jun 19, 2023
…iles This avoids the temporary creation of files as well as potential confusion about persisting the file name, and paves the way for storages that cannot operate on files but on streams. Resolves #7118. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
sschuberth
added a commit
that referenced
this issue
Jun 19, 2023
…iles This avoids the temporary creation of files as well as potential confusion about persisting the file name, and paves the way for storages that cannot operate on files but on streams. Resolves #7118. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current
ProvenanceFileStorage
interface and implementations have some potentially confusing quirks:fun putFile(provenance: KnownProvenance, file: File)
function takes a file, but actually only its contents are stored. In particular, the file name is lost and cannot be assumed to be maintained when callingfun getFile(provenance: KnownProvenance): File?
. As a result, also the extension of the original file is lost, so one cannot deduce the file type (which implies how its contents are to be interpreted) anymore.KnownProvenance
perProvenanceFileStorage
instance.As a straight-forward solution to address this, I'd propose to make the interface operator on Input- / OutputStreams rather than files. Alternatively (but with significant more work), the file name could also be (re-)stored, and multiple files (with different names) per storage could be allowed.
The text was updated successfully, but these errors were encountered: