Commit Graph

4 Commits

Author SHA1 Message Date
bc35037e88 Normalize and add options for backup, add more file flags options
- Move more function arguments to structs with some convenience
functions.
- Add a flag to enable backup/restore of file flags. It works a little
bit differently depending on system. Since we don't need to do anything
to get file flags on darwin/BSD, it's in the stat buffer so just save it.
For linux we have to open the file and do a
- Add the normalize flag to ReadAttributes. Implementation TBD.
- stub out common xattr file for doc comments
2023-10-06 22:10:38 -05:00
6a8d3d1c0b Add metadata and special files restore options
Add options to control if xattrs and specials get restored. Add
file flag mask preference. It's a rough interface, but this is a niche
use case.

Refactoring of options passing since golang ergonomics are poor for long
parameter lists.
2023-10-06 16:41:39 -05:00
9046b12f92 ReadFileFlags on linux minor fix
Add ignoring EINTR to syscall, set O_NOATIME on open, ignore
ENOTTY error (unsupported ioctl) to avoid massive spam for
non-exceptional failure on nonsupporting file systems
2023-10-06 15:47:50 -05:00
e791bc1f9b Split out xattr and flags routines to new files 2023-10-06 06:03:57 -05:00