eclipse-basyx / basyx-python-sdk

MIT License
60 stars 28 forks source link

adapter.aasx: allow deleting files from `SupplementaryFileContainer` #278

Closed jkhsjdhjs closed 4 months ago

jkhsjdhjs commented 4 months ago

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.

s-heppner commented 4 months ago

Looks good to me, thank you!