Skip to main content

write_bytes_private_atomic

Function write_bytes_private_atomic 

Source
pub fn write_bytes_private_atomic(path: &Path, bytes: &[u8]) -> Result<()>
Expand description

同 write_bytes_atomic,但把临时文件与最终文件设为 0600,并把父目录收为 0700 (敏感文件如 agent_runtime.json 落盘用)。裸文件名(无父目录)时跳过父目录改权限。