diff --git a/src/snapshot/tree.rs b/src/snapshot/tree.rs index f5a30dce..47cc3978 100644 --- a/src/snapshot/tree.rs +++ b/src/snapshot/tree.rs @@ -1,4 +1,7 @@ -use std::{collections::HashMap, path::PathBuf}; +use std::{ + collections::HashMap, + path::{Path, PathBuf}, +}; use rbx_dom_weak::{Descendants, RbxId, RbxInstance, RbxInstanceProperties, RbxTree, RbxValue}; @@ -135,6 +138,10 @@ impl RojoTree { } } + pub fn get_ids_at_path(&self, path: &Path) -> &[RbxId] { + self.path_to_ids.get(path) + } + fn get_metadata(&self, id: RbxId) -> Option<&InstanceMetadata> { self.metadata_map.get(&id) }