Skip to content

Commit

Permalink
added getter for privatedirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Nov 24, 2024
1 parent 153cb1b commit f3fb112
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wnfsutils"
version = "1.1.10"
version = "1.1.11"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
9 changes: 9 additions & 0 deletions src/private_forest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ pub struct PrivateDirectoryHelper<'a> {
// TODO: we assumed all the write, mkdirs use same roots here. this could be done using prepend
// a root path to all path segments.
impl<'a> PrivateDirectoryHelper<'a> {
// Public getter for the forest field
pub fn forest(&self) -> &Rc<HamtForest> {
&self.forest
}

// Public getter for the root_dir field (if needed)
pub fn root_dir(&self) -> &Rc<PrivateDirectory> {
&self.root_dir
}
async fn reload(
store: &mut FFIFriendlyBlockStore<'a>,
cid: Cid,
Expand Down

0 comments on commit f3fb112

Please sign in to comment.