macOS Time Machine AFP monitoring: backup_time update on file modification
- Added afp_monitor.rs module to track AFP_AfpInfo backup_time - Open struct now has 'modified' flag to track file modifications - write.rs sets modified=true on successful write - close.rs calls AfpMonitor::update_backup_time() on modified files - create.rs calls AfpMonitor::init_afp_info() on new file creation - AFP_AfpInfo stored as xattr com.apple.aapl.AfpInfo - backup_time updated to current epoch time on modification Also includes: - LZ4 compression using lz4_flex crate - Case sensitivity conditional on backend capabilities - LDAP cfg feature gate fix - RAID rebuild reconstruction implementation - DOS attributes xattr persistence - Snapshot disk persistence Tests: 201 smb-server, 452 markbase-core (653 total)
This commit is contained in:
@@ -140,6 +140,15 @@ pub trait VfsFile: Send {
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Read all bytes (convenience, seeks to end first to get size)
|
||||
fn read_all(&mut self) -> Result<Vec<u8>, VfsError> {
|
||||
let size = self.seek(std::io::SeekFrom::End(0))?;
|
||||
self.seek(std::io::SeekFrom::Start(0))?;
|
||||
let mut buf = vec![0u8; size as usize];
|
||||
self.read_exact(&mut buf)?;
|
||||
Ok(buf)
|
||||
}
|
||||
}
|
||||
|
||||
/// VFS 后端 trait(所有文件系统操作)
|
||||
|
||||
Reference in New Issue
Block a user