Set the metadata for this item. # Arguments `metadata` - File or directory metadata # Example ```rust,ignore use atomic_core::output::repo::TreeItem; use atomic_core::output::traits::FileMetadata; use atomic_core::types::{Inode, Position}; let item = TreeItem::file("script.sh", Inode::ROOT, Position::ROOT) .with_metadata(FileMetadata::executable()); assert!(item.metadata.is_executable()); ```
(mut self, metadata: FileMetadata)
| 583 | /// assert!(item.metadata.is_executable()); |
| 584 | /// ``` |
| 585 | pub fn with_metadata(mut self, metadata: FileMetadata) -> Self { |
| 586 | self.metadata = metadata; |
| 587 | self |
| 588 | } |
| 589 | |
| 590 | /// Get the filename (last component of path). |
| 591 | /// |
no outgoing calls