Get the filename (last component of path). # Returns The filename without the directory path. # Example ```rust use atomic_core::output::repo::TreeItem; use atomic_core::types::{Inode, Position}; let item = TreeItem::file("src/lib/mod.rs", Inode::ROOT, Position::ROOT); assert_eq!(item.filename(), "mod.rs"); ```
(&self)
| 598 | /// assert_eq!(item.filename(), "mod.rs"); |
| 599 | /// ``` |
| 600 | pub fn filename(&self) -> &str { |
| 601 | self.path.rsplit('/').next().unwrap_or(&self.path) |
| 602 | } |
| 603 | |
| 604 | /// Get the parent directory path. |
| 605 | /// |