pub fn unset_sandbox_storage(&mut self, path: &str) -> Result<bool> {
        match self.storages.get_mut(path) {
            None => {
                return Err(ErrorKind::ErrorCode(format!(
                    "Sandbox storage with path {} not found",
                    path
                ))
                .into())
            }
            Some(count) => {
                *count -= 1;
                if *count < 1 {
                    self.storages.remove(path);
                    return Ok(true);
                }
                return Ok(false);
            }
        }
    }
// unset_sandbox_storage will decrement the sandbox storage
// reference counter. If there aren't any containers using
// that sandbox storage, this method will remove the
// storage reference from the sandbox and return 'true' to
// let the caller know that they can clean up the storage
// related directories by calling remove_sandbox_storage
//
// It's assumed that caller is calling this method after
// acquiring a lock on sandbox.
unset_sandbox_storage will decrement the sandbox storage
reference counter. If there aren't any containers using
that sandbox storage, this method will remove the
storage reference from the sandbox and return 'true' to
let the caller know that they can clean up the storage
related directories by calling remove_sandbox_storage

It's assumed that caller is calling this method after
acquiring a lock on sandbox.
unset_sandbox_storage will decrement the sandbox storage reference counter . If there aren ' t any containers using that sandbox storage this method will remove the storage reference from the sandbox and return ' true ' to let the caller know that they can clean up the storage related directories by calling remove_sandbox_storage It ' s assumed that caller is calling this method after acquiring a lock on sandbox .
pub fn unset_sandbox_storage(&mut self, path: &str) -> Result<bool> {
        match self.storages.get_mut(path) {
            None => {
                return Err(ErrorKind::ErrorCode(format!(
                    "Sandbox storage with path {} not found",
                    path
                ))
                .into())
            }
            Some(count) => {
                *count -= 1;
                if *count < 1 {
                    self.storages.remove(path);
                    return Ok(true);
                }
                return Ok(false);
            }
        }
    }
pub fn unset_sandbox_storage ( & mut self , path : & str ) -> Result < bool > { match self . storages . get_mut ( path ) { None => { return Err ( ErrorKind :: ErrorCode ( format ! ( " " path ) ) . into ( ) ) } Some ( count ) => { * count -= 1 ; if * count < 1 { self . storages . remove ( path ) ; return Ok ( true ) ; } return Ok ( false ) ; } } }
unset_sandbox_storage will decrement the sandbox storage
reference counter.
unset_sandbox_storage will decrement the sandbox storage reference counter .
&mut self
path
&str
&mut self
path
&str