Function kernel::fs::mapping::get_mapping

source ·
pub fn get_mapping(
    path: &Path
) -> Result<(PathBuf, &Path, Arc<MappingNode>), FileSystemError>
Expand description

Retrieves the mapping for the given path.

This function traverses the filesystem mapping tree to find the appropriate mapping node for the given path. It returns a tuple containing the mapping path, the remaining path after the mapping, and the corresponding mapping node.

Parameters

  • path: A reference to the path for which the mapping needs to be retrieved.

Returns

  • Ok: If the mapping is found successfully, it returns a tuple containing the mapping path, the remaining path, and the mapping node.
  • Err: If the mapping is not found or an error occurs, it returns a FileSystemError.