Files
vaultik/internal/snapshot/ctime_test.go
user 25860c03a9
All checks were successful
check / check (pull_request) Successful in 2m27s
fix: populate ctime from actual filesystem stats instead of mtime fallback
Replace the mtime fallback for ctime in the scanner with platform-specific
implementations that extract the real ctime from syscall.Stat_t:

- macOS/Darwin: uses Birthtimespec (file birth/creation time)
- Linux: uses Ctim (inode change time)
- Falls back to mtime when syscall stats are unavailable (e.g. afero.MemMapFs)

Also:
- Document platform-specific ctime semantics in README
- Document ctime restore limitations (cannot be set on either platform)
- Add ctime field documentation to File model
- Update README files table schema to match actual schema (adds ctime,
  source_path, link_target columns)
- Add comprehensive tests for fileCTime on real files and mock FileInfo

closes #13
2026-03-17 13:49:51 -07:00

3.5 KiB