MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / set_permissions

Method set_permissions

atomic-core/src/output/memory.rs:660–672  ·  view source on GitHub ↗
(&self, path: &str, permissions: u16)

Source from the content-addressed store, hash-verified

658 }
659
660 fn set_permissions(&self, path: &str, permissions: u16) -> Result<(), Self::Error> {
661 let mut files = self.files.borrow_mut();
662
663 match files.get_mut(path) {
664 Some(file) => {
665 file.metadata.permissions = permissions;
666 Ok(())
667 }
668 None => Err(MemoryError::NotFound {
669 path: path.to_string(),
670 }),
671 }
672 }
673
674 fn write_file(&self, path: &str, inode: Inode) -> Result<Self::Writer, Self::Error> {
675 // Ensure parent directory exists

Callers 2

test_set_permissionsFunction · 0.45

Calls 1

get_mutMethod · 0.80

Tested by 2

test_set_permissionsFunction · 0.36