It works well (reading, extraction, creation) but the arx toolkit doesn’t support modifying a archive.
I haven’t found a way to register the backend to allow creation of archive but not its modification.
If I return FR_ARCHIVE_CAN_READ for capabilities, file-roller correctly set the archive as read only, but you cannot create a new one. With FR_ACHIVE_CAN_REA_WRITE, you can create the archive but also (try to) modify it.
In all cases, I set propAddCanUpdateand propAddCanReplace to FALSE.
Is there a combination that allow creation only of archive ?
I do not think it is currently possible to delay creating immutable archives – File Roller appears to always try to modify the archive immediately after adding new files. But at least for the FrCommand subclasses, it will always uncompress and recompress the archive anyway so you should not need to care about it much.
Indeed. But it is not possible de “uncompress” a arx archive (at least not as “tar.gz → tar”. You can of course extract all files in a directory). So I would need to implement “uncompress” as “extract”.
But the whole purpose of arx is to avoid full decompression (by allowing random access to files in it). So it would be a pity to extract all arx to add one file.
I think it would be better to re-prioritize the development on arx and allow modification of the archive without pre-decompression.
Is the boolean update passed to the add method can be used to detect that the archive already exist ? I could use it to error the process. Or it is that we want to update existing files in the archive (as propAddCanReplace does) ?