pub fn folder(&self, mut path: &[LayerId]) -> Result<&Folder, DocumentError> {
		let mut root = &self.root;
		if self.is_mounted(self.work_mount_path.as_slice(), path) {
			path = &path[self.work_mount_path.len()..];
			root = &self.work;
		}
		for id in path {
			root = root.folder(*id).ok_or(DocumentError::LayerNotFound)?;
		}
		Ok(root)
	}
/// Returns a reference to the requested folder. Fails if the path does not exist,
/// or if the requested layer is not of type folder.
/// This function respects mounted folders and will thus not contain the layers already
/// present in the document if a temporary folder is mounted on top.
Returns a reference to the requested folder. Fails if the path does not exist,
or if the requested layer is not of type folder.
This function respects mounted folders and will thus not contain the layers already
present in the document if a temporary folder is mounted on top.
Returns a reference to the requested folder . Fails if the path does not exist or if the requested layer is not of type folder . This function respects mounted folders and will thus not contain the layers already present in the document if a temporary folder is mounted on top .
pub fn folder(&self, mut path: &[LayerId]) -> Result<&Folder, DocumentError> {
		let mut root = &self.root;
		if self.is_mounted(self.work_mount_path.as_slice(), path) {
			path = &path[self.work_mount_path.len()..];
			root = &self.work;
		}
		for id in path {
			root = root.folder(*id).ok_or(DocumentError::LayerNotFound)?;
		}
		Ok(root)
	}
pub fn folder ( & self , mut path : & [ LayerId ] ) -> Result < & Folder , DocumentError > { let mut root = & self . root ; if self . is_mounted ( self . work_mount_path . as_slice ( ) , path ) { path = & path [ self . work_mount_path . len ( ) .. ] ; root = & self . work ; } for id in path { root = root . folder ( * id ) . ok_or ( DocumentError :: LayerNotFound ) ? ; } Ok ( root ) }
Returns a reference to the requested folder.
Returns a reference to the requested folder .
&self
path
&[LayerId]