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

adapter.aasx: allow deleting files from SupplementaryFileContainer #278

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

jkhsjdhjs
Copy link
Contributor

AbstractSupplementaryFileContainer and DictSupplementaryFileContainer are extended by a delete_file() method, that allows deleting files from them. Since different files may have the same content, references to the files contents in DictSupplementaryFileContainer._store are tracked via _store_refcount. A files contents are only deleted from _store, if all filenames referring to these these contents are deleted, i.e. if the refcount reaches 0.

`AbstractSupplementaryFileContainer` and
`DictSupplementaryFileContainer` are extended by a `delete_file()`
method, that allows deleting files from them. Since different files may
have the same content, references to the files contents in
`DictSupplementaryFileContainer._store` are tracked via
`_store_refcount`. A files contents are only deleted from `_store`, if
all filenames referring to these these contents are deleted, i.e. if the
refcount reaches 0.
@jkhsjdhjs jkhsjdhjs force-pushed the aasx/file_container_deletion branch from f3c25b9 to 3a11141 Compare June 13, 2024 14:07
@s-heppner
Copy link
Contributor

Looks good to me, thank you!

@s-heppner s-heppner merged commit 67432b5 into eclipse-basyx:main Jun 13, 2024
8 checks passed
@s-heppner s-heppner deleted the aasx/file_container_deletion branch June 13, 2024 14:12
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

Successfully merging this pull request may close these issues.

2 participants