INNER CODE UNIT · Rust

new

ouch-org/ouch · src/sandbox/mod.rs:20

    pub fn new() -> Self {
        Self::default()
    }

    pub fn allow_read<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self {
        self.read.push(path.into());
        self
    }

    pub fn allow_read_write<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self {
        self.read_write.push(path.into());
        self
    }

    /// Allow deleting files inside `path` without granting any other write rights.
    pub fn allow_remove_in<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self {
        self.remove_in.push(path.into());
        self

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…