Create a record item with full details. # Arguments `path` - The file path `inode` - The file's inode `parent_inode` - The parent directory's inode `parent_position` - The parent's graph position `metadata` - File metadata
(
path: PathBuf,
inode: Inode,
parent_inode: Inode,
parent_position: Position<NodeId>,
metadata: FileMetadata,
)
| 614 | /// * `parent_position` - The parent's graph position |
| 615 | /// * `metadata` - File metadata |
| 616 | pub fn with_details( |
| 617 | path: PathBuf, |
| 618 | inode: Inode, |
| 619 | parent_inode: Inode, |
| 620 | parent_position: Position<NodeId>, |
| 621 | metadata: FileMetadata, |
| 622 | ) -> Self { |
| 623 | let basename = path |
| 624 | .file_name() |
| 625 | .map(|s| s.to_string_lossy().to_string()) |
| 626 | .unwrap_or_default(); |
| 627 | |
| 628 | Self { |
| 629 | path, |
| 630 | basename, |
| 631 | inode, |
| 632 | parent_inode, |
| 633 | parent_position, |
| 634 | metadata, |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | /// Get the file path. |
| 639 | pub fn path(&self) -> &Path { |