ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

Preserve file group, permission bits, and timestamps #41

Closed adammoody closed 4 years ago

adammoody commented 5 years ago

If user applications are setting specific groups or permission bits on the source files, I'm guessing they'd like to have those properties preserved after a transfer. We don't currently do this.

As for timestamps, I can imagine some apps might want to preserve those (use timestamp from the source files) and some apps might want to assign new timestamps when creating the destination files.

And then there are things like extended attributes, although that's probably much less of a concern (much smaller user base).

Not sure how any of the vendor APIs deal with this.

tonyhutter commented 5 years ago

Maybe the default guarantee should be "AXL preserves whatever your transfer type preserves" (which we should document), but then give the option to explicitly say "preserve timestamps" or "preserve XATTRs" or whatever in AXL_Config(). That would work for most cases. It wouldn't work in the case where you wanted different files in your file list to have different attributes preserved. For that you'd have to add a flag value to AXL_Add() or something. Like: AXL_Add(id, src, dest, AXL_PRESERVE_XADDR | AXL_PRESERVE_PERMISSIONS).

I would vote in favour of just setting it globally in AXL_Config(), since the common case will be that they'd want the same attributes preserved for all their files.