parent
758d1bfe57
commit
47b5e97006
@ -0,0 +1,24 @@
|
|||||||
|
use super::*;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
/// Contains a graph of all paths and inodes that were successfully stat'd
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub struct INodeInfoGraph
|
||||||
|
{
|
||||||
|
inodes: HashMap<INode, FsInfo>, // FsInfo contains parent INode that can be used to look up again in this table
|
||||||
|
paths: HashMap<PathBuf, INode>, // map absolute paths to INodes to be looked up in `inodes` table.
|
||||||
|
}
|
||||||
|
|
||||||
|
impl INodeInfoGraph
|
||||||
|
{
|
||||||
|
/// Create a new graph from these linked `HashMap`s
|
||||||
|
#[inline] pub fn new(inodes: HashMap<INode, FsInfo>, paths: HashMap<PathBuf, INode>) -> Self
|
||||||
|
{
|
||||||
|
Self {
|
||||||
|
inodes,
|
||||||
|
paths
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//TODO: Order by largest size, get and iter fns etc
|
||||||
|
}
|
Loading…
Reference in new issue