Add method returning a mapping from tag name to tag value for more generic access#596
Open
sknull wants to merge 2 commits into
Open
Add method returning a mapping from tag name to tag value for more generic access#596sknull wants to merge 2 commits into
sknull wants to merge 2 commits into
Conversation
Owner
|
Thanks for the PR! I wonder what this gives over just iterating the contents of the directory and building the map externally? I think that'd have better performance, as this loops over all possible tags, rather than only those which are present. This method also excludes all unknown tag values, which I think might be surprising for some folks. My thinking is that this method could be written by a consumer of the library, even without access to the protected |
b21bcfb to
3f46001
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hej,
for a new project we need a more generic access to directories without needing to know specific key names.
The descriptors also make it necessary to actually know the key names.
In our example we need dictionary like access to the IPTC metadata.
To make this possible I added the method getTagMap() which returns just that as a readonly map of course to prevent external manipulation.
I hope this pull request is concise enough to be considered merging.
Cheers,
Stephan