That's why I wrote the PermissionCode function that reads the permissions and at first glance it works as it should.
There may be a way to do this without an additional function, but I don't know about it. That's why I turned to you.
Or rather, turned to the community: I'd hardly call myself the local expert :-)
I suspect that the whole area of setting permissions/modes (plus of course user/group ownership) is sufficiently OS-specific that it was left out of (or removed from) the library intentionally. I'm a little surprised that the author went to the trouble of breaking out the various mode bits if he wasn't going to use them, but it might be that he realised that he was letting himself in for a big (and controversial) job.
My suggestion would be to stick with your PermissionCode() function, but to do a lot of careful error checking inside it since- if your program lives long and prospers- you might easily encounter a situation where one or more platforms decides that e.g. an ordinary user can't set the group execute bit.
Finally, I'm a little concerned that that author of the library appears to have used it as an excuse to show off his prowess in OO programming, stream handling etc. when a much simpler approach would have sufficed. Mark Roth's original libtar is 375+305 lines (.c and .h files respectively), Fuzix tar to run on an RP2040 is 744, while this is 995 lines and arguably incomplete. It would be all very well if it provided e.g. indexing facilities so that once the archive had been read an individual file could be extracted efficiently, but all I see here is "OO is sexy and we should use it at every possible opportunity"... in English we'd call that "willy waving" but I appreciate that what you see might be at Google's discretion :-)
MarkMLl