magi-code 0.105.1

Repository-aware CLI coding agent for terminal work
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

// Fixture permissions for session_snapshot_size_measurement.
pub(crate) fn secure_profiling_session_root(root: &Path) {
    fs::create_dir_all(root).unwrap();
    set_mode(root, SESSION_ROOT_MODE).unwrap();
    for entry in fs::read_dir(root).unwrap().flatten() {
        if entry
            .file_type()
            .map(|kind| kind.is_file())
            .unwrap_or(false)
        {
            set_mode(&entry.path(), SESSION_FILE_MODE).unwrap();
        }
    }
}