Skip to content

Commit

Permalink
recover metadata_from_node
Browse files Browse the repository at this point in the history
  • Loading branch information
wasm-forge committed Aug 30, 2024
1 parent 176107f commit 526a841
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ pub enum Error {
ExpectedToRemoveDirectory,
CannotRemoveOpenedNode,
CannotRemoveMountedMemoryFile,
IncompatibleChunkSize,
IncompatibleChunkSize,
}
5 changes: 5 additions & 0 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ impl FileSystem {

Ok(())
}

// Get the metadata for a given file descriptor
pub fn metadata_from_node(&self, node: Node) -> Result<Metadata, Error> {
self.storage.get_metadata(node)
}

// Get the metadata for a given file descriptor
pub fn metadata(&self, fd: Fd) -> Result<Metadata, Error> {
Expand Down

0 comments on commit 526a841

Please sign in to comment.